Purchase Order, Receipt and Invoice Reconciliation
A three-way reconciliation checks whether the purchase order, warehouse receipt and supplier invoice agree before an invoice is cleared for payment.
Executed DuckDB evidence generated from the retained BPI event log. It is not a screenshot of an Accounts Payable platform.
Before an invoice is paid
Three records must tell the same story.
A buyer confirms what was ordered. The warehouse records what arrived. Accounts Payable records what the supplier billed. This build compares those events for every purchase order item, clears supported cases and holds the rest for the team that can resolve them.
The equation comes from the complete BPI Challenge 2019 build. Each item has one final class. Consignment items are kept outside the invoice decision rather than forced through a rule that does not apply.
Invoices that still need a decision
The difference stays beside the team that can investigate it.
The queue below is exported from DuckDB. It shows one retained item from several unresolved classes, including a missing invoice, a missing receipt, a reversal and a recorded value difference.
| Purchase item | Reason | Purchase value | Receipt value | Invoice value | Age at source close | Responsible team | Decision |
|---|---|---|---|---|---|---|---|
4507000280_00010 | Purchase item was cancelled or deleted | 397 | 0 | 0 | 702 days | Buyer | payment hold |
4507000473_00001 | Invoice is missing | 92 | 76,675 | 0 | 702 days | Accounts Payable | payment hold |
4507075965_00020 | A receipt or invoice was cancelled | 265 | 0 | 265 | 686 days | Finance reviewer | payment hold |
4507000855_00080 | Recorded values differ | 88 | 177 | 88 | 672 days | Buyer | payment hold |
4507004049_00030 | Warehouse receipt is missing | 92 | 0 | 92 | 658 days | Warehouse receiving | payment hold |
Values are the publisher's translated monetary fields. They preserve comparisons but do not represent disclosed currency amounts.
How the decision is made
The purchase, receipt and invoice meet before payment.
The source states whether a goods receipt is required. Two-way items compare the purchase and invoice. Three-way items also require a warehouse receipt. Ordered rules then deal with timing, repeated events, reversals and missing records.
- 01The buyer raises a purchase item
The purchase document, supplier and required receipt rule remain attached.
- 02The warehouse records what arrived
Receipt, cancellation and repeated receipt events stay in source order.
- 03Accounts Payable records the invoice
The build checks whether the required records and translated values agree.
- 04The item is cleared or held
A held item keeps its reason, responsible team, age and complete event history.
What the source actually contains
Exact, grouped, timing and exception paths are all retained.
The full event log naturally exercises twelve of the fourteen configured classes. Small-value tolerance and partial-open behaviour are tested with explicit SQL fixtures because the public source does not populate those two paths.
- 01Warehouse receipt is missing
A three-way item stays on hold until warehouse receiving records what arrived or corrects the purchase record.
- Purchase items
- 296
- Payment state
- payment hold
- Next team
- Warehouse receiving
- 02A receipt or invoice was cancelled
A finance reviewer checks the reversal history before the item can be cleared.
- Purchase items
- 6,659
- Payment state
- payment hold
- Next team
- Finance reviewer
- 03Invoice arrived before receipt
The invoice waited until the warehouse receipt was recorded, then Accounts Payable cleared it with the timing history retained.
- Purchase items
- 109,197
- Payment state
- cleared with timing note
- Next team
- Accounts Payable
- 04Several receipt events
More than one goods receipt belongs to the purchase item. The events are reviewed together before the invoice is cleared.
- Purchase items
- 1,076
- Payment state
- cleared after grouped review
- Next team
- Warehouse receiving
- 05Purchase, receipt and invoice agree
The required documents are present and their recorded translated values agree.
- Purchase items
- 89,301
- Payment state
- cleared by rule
- Next team
- Accounts Payable
- 06Recorded values differ
The buyer reviews the purchase record and supplier bill because the translated values do not agree within the configured rule.
- Purchase items
- 1,556
- Payment state
- payment hold
- Next team
- Buyer
One purchase item traced
This invoice waited for the warehouse receipt.
Purchase item 4507000232_00010 carried the same translated value of 564 on the purchase, receipt and invoice events. The invoice was recorded first, so payment stayed blocked until the warehouse event arrived.
2 Jan 2018
3 Jan 2018
4 Jan 2018
- 01Create Purchase Order Item
Buyer · 2 Jan 2018
- 02Vendor creates invoice
Accounts Payable · 2 Jan 2018
- 03Record Invoice Receipt
Accounts Payable · 3 Jan 2018
- 04Record Goods Receipt
Warehouse receiving · 4 Jan 2018
- 05Remove Payment Block
Accounts Payable · 4 Jan 2018
- 06Clear Invoice
Accounts Payable · 25 Jan 2018
Accounts Payable removed the block after receipt and cleared the invoice on 25 Jan 2018. The retained decision is “clear with timing note”.
Checks before publication
Twenty-one checks passed on the complete build.
SQL checks the publisher counts, unique keys, classification, responsible teams, summary tie-outs, record trace and rule edge cases. A second verifier reads the exported files without querying DuckDB.
Complete purchase-item source retained
PASSComplete event source retained
PASSNo purchase item is classified twice
PASSEvery unresolved item has a responsible team
PASSSummary item counts tie to detail
PASSOut-of-window timestamps are retained as exceptions
PASSData and limits
The complete BPI Challenge event log, matching rules and SQL rebuild together.
The project processes all 1,595,923 events for 251,734 purchase order items in BPI Challenge 2019.
Technical documentationOpen the retained data, rebuild command and detailed limitations
The build retains the publisher DOI, licence, checksum and 320 timestamps outside the main 2018–2019 process window as visible data exceptions.
npm run verify:reconciliationThe command verifies the 728 MB XES file, streams every trace, rebuilds the DuckDB model, exports the decisions and checks those files independently.
Published by 4TU.Centre for Research Data under CC BY 4.0. The historical, anonymised log does not expose physical ordered, received or invoiced quantities. This is not an Accounts Payable product or audit opinion.
Next step
Review the controls beneath a supplier payment queue.
Start with the files, joins and checks that make the current reporting route difficult to trust or maintain.
