Quantity on order formula for Transfer order transaction

We can use the below formula in a transaction search

CASE WHEN {type} = ‘Transfer Order’ AND {transactionlinetype}= ‘Item’ AND {closed}=’F’ THEN ABS({quantity})-{transferorderquantityreceived} ELSE NULL END

The below formula to get on order from both PO and TO in a single column

NVL(CASE WHEN {type} = ‘Purchase Order’ THEN {quantity}-{quantityshiprecv} ELSE NULL END,CASE WHEN {type} = ‘Transfer Order’ AND {transactionlinetype}= ‘Item’ AND {closed}=’F’ THEN ABS({quantity})-{transferorderquantityreceived} ELSE NULL END)

Leave a comment

Your email address will not be published. Required fields are marked *