Three-way match partial PO receipts and supplier invoices in TypeScript
Your PO orders 100 units at $12.50 each. The dock receives 60 and sends 10 back. AP has already posted 40 units, so only 10 units are available to bill against receipts. The next invoice splits 15 units across two lines. Each line fits on its own, but together they exceed the net receipt by five units. Compare the invoice against both quantity limits Join to a specific PO schedule and check…
The article discusses a three-way match process involving purchase orders, receipts, and supplier invoices in TypeScript. The process is demonstrated through code examples, which compare the quantity limits of PO orders, received goods, and posted invoices. The code defines types for PurchaseOrder, Receipt, and Invoice, and includes functions to assert invoice scope matches the PO and to handle positive quantity variances.
The article also provides an example of a three-way match function, which compares PO and receipt data, and allows for a small unit-price variance of up to two cents.
Brief written by urgent.news; may contain errors — check the original.
Source: dev.to