Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Partial Shipment Check Qty left!
Message
From
11/12/1999 08:40:45
 
 
To
10/12/1999 23:03:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00302169
Message ID:
00302210
Views:
23
>For Stardard situation,
>
>
>Orders   (Order_ID, ....)
>    |
>   /|\
>OrdItems (Order_ID, ITEM, QTY, ....)
>    |
>   /|\
>Shipment (SHIP_NO, Order_ID, ITEM, SHIPQTY, ....)
>
>
>

>
>Serval Shipment to Finish this Orders!
>
>How to Calculate the Left QTY (Not send to Shipment for the Orders)?
>Thank you!

Hi Justok,

Not sure if this is what your asking, but when I process orders against blanket open purchase orders I do something like the following using a view and a SCAN ENDSCAN:

*If PO has some parts left but not the entire amount do this
IF (shipview1.qty_ordered - shipview1.qty_shipped) - QtyToShip < 0
*get remaining parts on this PO
OldQtyToShip = QtyToShip
NewQtyToShip = shipview1.qty_ordered - shipview1.qty_shipped

*define QtyToShip for the return loop
QtyToShip = OldQtyToShip - NewQtyToShip


..........rest of processing code

HTH
Tony
Skill comes from Diligence
Previous
Reply
Map
View

Click here to load this message in the networking platform