Post date: Oct 26, 2020 7:33:34 PM
Whenever a purchase order (PO) line or PO receipt gets updated, SMCP runs a function to update the status of the PO. First, the function gets the quantity ordered and received from the icpolines table for the PO in question.
Then each line of the PO is checked to see if the quantity received is equal to or MORE than the quantity ordered and marks each line as 'completely received'. If ALL the lines are 'completely received', the PO status is saved as 'complete', otherwise, it's 'partially received' or 'entered' status.
The function that updates the status of the PO only gets executed when a receipts line or PO line is saved. It does not run every time the PO header is saved.