>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)?
In systems that I design for this, the OrderItem line has a primary key of its own. There's a Shipment header that ties to the customer but not to an order (a shipment may contain items from several orders), with Ship lines tied to the parent Shipment and the OrderItem that it shipped against (you may have the same item occur multiple times on the same order, or occur multiple times in a shipment from several different orders.)