Add Pending Qty column in PO Receipt screen in Sage X3

In Sage X3, we know that users can create the PO order, PO receipt, PO return and PO invoice transactions against vendors/suppliers using purchase module. So in PO module, whenever user created the receipt from particular purchase order or returning some qty using purchase return screen, then Qty on hand or stock Qty got affected.

For one of our client, we did customization where user wants to know the pending PO quantity on the Receipt entry screen itself so that user must be aware of the status of that particular PO whether it’s partially received or completely received. Also whenever user creates the return entry against that particular receipt then Pending quantity on that particular PO should also get changed accordingly. So to achieve this we have added an additional column ‘Pending Quantity’ on PO Receipt/GRN detail grid which got refreshed based on the quantity received and quantity return with reference to that particular PO.

For example, If we have created Purchase Order with ordered Qty=1000 and post that purchase order transaction. (Go to Purchasing–>Orders Section–>Orders).

New Stuff: https://www.greytrix.com/blogs/sagex3/2020/07/01/the-narration-of-function-and-its-parameter-used-to-call-an-external-outgoing-rest-web-service-from-asyrrestcli-library/

[Sample Purchase Order]

And then we have created Purchase Receipt entry with Qty=800 and post that purchase receipt transaction. (Purchasing–>Receipts Section–>Receipts) Refer below screenshot:-

[Sample Purchase Receipt]

After creation of Purchase Receipt entry, out of 1000 quantity, 800 quantity got received so Pending qty get changed to 200 i.e. (1000-800), as shown in the below screenshot:-

Purchase Receipt screen with pending qty

When we will create another receipt from same purchase order with remaining qty i.e. 200 then pending qty will get changed to 0.

In the same manner when user creates the Purchase Return entry of the above Receipt, the pending qty value will get changed in receipt detail grid. Let’s take an example, supposed if we raised Purchase Return entry with 50 Qty against the above receipt and posted that purchase return transaction. When user reopen previous receipt then pending qty will be displayed as 250.

This customization is developed so that user can easily identify in the receipt screen that what is the pending qty for particular purchase order after creating purchase receipt and purchase return transactions.