I’m busy with a small storage system for my site, but i encounter some problems with it.
I have successfully managed to get all products from the order, and traced on what spots those product are in the warehouse.
It looks like this atm http://img37.imageshack.us/img37/7302/tableordereng.jpg
this is the code i have atm (sorry i program in dutch, i hope its abit understandable)
[php]
<?php $query = "select * from `orderregel` WHERE `ordernr`='".$ordernr."'"; $row = mysql_fetch_array( $query ); echo "artikelnummer | productnaam | Plaats | aantal in magazijn | aantal nodig |
---|
".$magazijn->artikelnr." | ".$magazijn->productnaam." | ".$magazijn->magazijn_plaats." | ".$magazijn->aantal." | ".$user->aantal." |
[/php]
The problem i have now is, that i want it to do the following.
for example someone orders 430 packages of Haribo Kers Cola (see imageshack upload). I first want it to empty spot 16 in the wherehouse.
Only when spot 16 is empty, i want it to go to the next spot (19) wich contains the same product.
the end result would be something like this:
http://img690.imageshack.us/img690/6246/tableorderneweng.jpg
i hope you guys can help me out on this one, becouse i have no clue how i can resolve this problem
thanks in advance
(Sorry btw for my bad english :P)