I need to create a batch job to post purchase order line product receipt only if all registered InventTrans has works completed for this purchase order line.
But I can't because there is no direct link between InventTrans and WHSWorkLine. the system can only see
work lines in purchase order line level ,not in InventTrans level. (Purchline.InventTransId=WHSWorkLine.InventTransId )
currently we don't use load to link purchase order line with WHSWorkLine.
For example, I have a purchase order line of qty 5,
(1)scenario 1: qty 2 is registered and its warehouse work is completed, remained 3 is registered and its warehouse work is cancelled later.
(1)scenario 2: qty 2 is registered and its warehouse work is completed, remained 3 is registered and its warehouse work is cancelled ,and then I unregister , re-registered for this remained 3 and complete work.
The batch job can't tell the difference scenario 1 and 2. scenario 2 should be allowed to be posted.