09. januar 2008 - 16:01Der er
12 kommentarer og 1 løsning
Lagerstyring af flasker med differenceret indhold
Hej Eksperter
Spørgsmålet går kort og godt ud på følgende: I en forespørgsel har jeg følgende: OrdreID FlaskeId Brugt dato Netto Kg Brugt kg Status 37 39 21-09-2007 11 1 10 44 39 21-11-2007 11 0,5 10,5 45 39 24-11-2007 11 10 1 46 39 21-12-2007 11 6 5 6 40 11-03-2007 20 1 19 15 40 30-04-2007 20 0,5 19,5 22 40 17-07-2007 20 2 18
Som det ses har jeg flere ordrer, men få flasker der er fyldt med netto kg vand, vandet bruges flere forskellige datoer med forskellige kg intervaler. Status er en udregnet netto-brugt formel der virker, men status/netto beholdning bliver ikke reguleret og den ville jeg gerne have lavet - kan man det?
"..Jeg vil kunne give dig et tilbud på at løse opgaven .."! Maybe I missed something, is gerifix28 suggesting he wants to pay for a solution? If so then this question should be in another category, if not then we should wait and see if we can find a solution which is free.
Synes godt om
Slettet bruger
10. januar 2008 - 11:02#4
En løsning er at oprette en tabel ved hjælp af forespørgslen og globale variable. Der er et eksempel på dette, som er rimelig simpelt og temmelig tjekket, her:
Terry, thank you for your comment - i don´t want to pay for a solution. imagine this: a bottle with 11 kg (flaskeID)and(netto), a order where there is used 1 kg(brugt kg) gives a (status) of 10 kg. These 10 kg are the (new netto kg). Now comes the tricky part, a new order on the same bottle, now with a order of 0,5 kg, this should be from (new netto kg). = 9,5 kg.
Klaus, I think the correct solution all depends on how you design the tables and how you interact with the user.
Lets say you have a table with Bottle types. In this table you would have the details such as weight.
Now I guess that you have many of the same type so you might also have another table which contains info on each bottle (type (from type table), Flakse ID) and any other information which is specific for a unique bottle.
Now you need another table where you register all of the movements which you show in the example in your original question. NOTE I have reomved some of the fields because these come from another table or are calculated.
OrdreID, FlaskeId, [Brugt dato], [Brugt kg]
If you enter the inoformation in a form then you could show the bottle information on the main form and the movements in a sub form. On the main form you would see the [Netto Kg] taken from the Bottle Type table, and I would suggest that in the Bottle table you have a field which reflects the status of the bottle. This field should get updated after each movement.
So you only have one field (in the bottle table) which shows the correct status [Netto Kg]. You could also have it in each movement record.
Depending on which method you want depends on the solution although they are very similar.
I can see how your data looks at the moment but I'm not sure how you enter the data or if its all in one table.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.