Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have stock table with receives and delivery from warehouse.
I would want to transform this table into new table where I could get info about value of delivery goods.
So basically FIFO what first goes int o stock had to also leave first form warehouse.
So from table:
Date | quantity | stock | order | value |
22012014 | 15 | 15 | 90201 | 11,3 |
23012014 | -2 | 13 | 80450 | |
23012014 | -3 | 10 | 80451 | |
24012014 | -5 | 5 | 80452 | |
25012014 | 10 | 15 | 90202 | 12,5 |
26012014 | -1 | 14 | 80453 | |
27012014 | -3 | 11 | 80454 | |
28012014 | -5 | 10 | 80455 | |
29012014 | -1 | 9 | 80456 | |
30012014 | -1 | 8 | 80457 | |
10022014 | 5 | 13 | 90203 | 13,7 |
30022014 | -9 | 4 | 80458 |
I would like to get this table:
Date | order | receive | quantity | value |
23012014 | 80450 | 90201 | 2 | 11,3 |
23012014 | 80451 | 90201 | 3 | 11,3 |
24012014 | 80452 | 90201 | 5 | 11,3 |
26012014 | 80453 | 90201 | 1 | 11,3 |
27012014 | 80454 | 90201 | 3 | 11,3 |
28012014 | 80455 | 90201 | 1 | 11,3 |
28012014 | 80455 | 90202 | 4 | 12,5 |
29012014 | 80456 | 90202 | 1 | 12,5 |
30012014 | 80457 | 90202 | 1 | 12,5 |
30022014 | 80458 | 90202 | 8 | 13,7 |
30022014 | 80458 | 90203 | 8 | 13,7 |
30022014 | 80458 | 90203 | 8 | 13,7 |
Well I found out as I made few mistakes in both tebles.. this are new better tables..
Date | quantity | stock | order | value |
22012014 | 15 | 15 | 90201 | 11,3 |
23012014 | -2 | 13 | 80450 | |
23012014 | -3 | 10 | 80451 | |
24012014 | -5 | 5 | 80452 | |
25012014 | 10 | 15 | 90202 | 12,5 |
26012014 | -1 | 14 | 80453 | |
27012014 | -3 | 11 | 80454 | |
28012014 | -5 | 6 | 80455 | |
29012014 | -1 | 5 | 80456 | |
30012014 | -1 | 4 | 80457 | |
10022014 | 5 | 9 | 90203 | 13,7 |
30022014 | -9 | 0 | 80458 |
And second table::
Date | order | receive | quantity | value |
23012014 | 80450 | 90201 | 2 | 11,3 |
23012014 | 80451 | 90201 | 3 | 11,3 |
24012014 | 80452 | 90201 | 5 | 11,3 |
26012014 | 80453 | 90201 | 1 | 11,3 |
27012014 | 80454 | 90201 | 3 | 11,3 |
28012014 | 80455 | 90201 | 1 | 11,3 |
28012014 | 80455 | 90202 | 4 | 12,5 |
29012014 | 80456 | 90202 | 1 | 12,5 |
30012014 | 80457 | 90202 | 1 | 12,5 |
30022014 | 80458 | 90203 | 4 | 13,7 |
30022014 | 80458 | 90203 | 5 | 13,7 |