three-way-match
Skill0 starsChanged 3 months agoMITView on GitHub
Perform an accounts-payable three-way match in Acumatica - reconcile a vendor Bill against its Purchase Receipt and Purchase Order at the line level and flag price and quantity variances. Use when the user wants to validate a bill before release, check that a bill matches what was ordered and received, audit AP for over-billing or quantity mismatches, find bills with no linked PO or receipt, or run a procure-to-pay matching report. Walks bill lines to their PO and receipt via the PO order and receipt reference fields, compares billed quantity and unit cost to ordered and received values, and reports matched, variance, and unmatched lines. Read-only - it reports discrepancies and links each document; it does not modify or release anything.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- adoptai/cpa-skillstheir own version, first seen Nov 8, 2026
- MosoFin/mosofin-finance-skillstheir own version, first seen Oct 15, 2026
- prab-hub/revexos-q2c-kittheir own version, first seen Oct 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- adoptai/cpa-skills★ 8same name
- MosoFin/mosofin-finance-skills★ 2same name
- prab-hub/revexos-q2c-kit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ap-healthSkill
- ar-healthSkill
- doc-doctorSkill
- recent-recordsSkill
The file
Files
Acumatica - Three-Way Match (Bill <-> Receipt <-> PO)
Reconcile what was ordered (PO) vs received (receipt) vs billed (bill), line by line, and flag variances before a bill is paid. Read-only - never releases or edits a document.
⚠️ Known tenant behaviour
$orderbyis silently ignored - sort client-side.- Date filters need
datetimeoffset'YYYY-MM-DDTHH:MM:SS-04:00'literals. $select/$filterfield names must match exactly or you get a hard 500.- Decimal comparison filters (e.g.
gt 0) may 500 with "Type conversions not supported" - filter client-side instead. - Render each document number as a Markdown link from its
browser_url.
The linking chain (verified field names)
Each Bill line (Bill -> expand="Details") carries the back-references:
POOrderType, POOrderNbr, POLine -> the originating PO line, and
POReceiptType, POReceiptNbr, POReceiptLine -> the receipt line. Line amounts: Qty, UnitCost,
ExtendedCost, Amount, InventoryID, LineType.
Each PurchaseReceipt line (PurchaseReceipt -> expand="Details") carries:
POOrderType, POOrderNbr, POLineNbr (link to PO line), ReceiptQty, OrderedQty, OpenQty, UnitCost,
ExtendedCost, InventoryID, POReceiptNbr, POReceiptLineNbr.
Each PurchaseOrder line (PurchaseOrder -> expand="Details") carries:
LineNbr, InventoryID, OrderQty, QtyOnReceipts, UnitCost, ExtendedCost, Completed.
Goods lines carry these PO/receipt references. Non-goods bill lines (e.g. accrued warranty, freight, GL-only) have the reference fields empty - those are legitimately "no PO" and should be reported as unmatched-by-design, not as errors.
How to match a single bill
get_record(entity="Bill", id="Bill/<RefNbr>", expand="Details").- For each bill line with a
POOrderNbr, pull the PO once:get_record(entity="PurchaseOrder", id="<POOrderType>/<POOrderNbr>", expand="Details")and find the line whereLineNbr == bill.POLine. - For each bill line with a
POReceiptNbr, pull the receipt:get_record(entity="PurchaseReceipt", id="<POReceiptType>/<POReceiptNbr>", expand="Details")and find the line where itsPOReceiptLineNbr/LineNbrmatchesbill.POReceiptLine. - Compare per line (see rules) and classify each as Match, Variance, or Unmatched.
Cache PO/receipt lookups - many bill lines share one PO.
Match rules (per bill line)
- Quantity:
bill.Qtyshould equal the receipt lineReceiptQty. Bill qty != received qty -> variance. - Price:
bill.UnitCostshould equalPO.UnitCost(and the receiptUnitCost). Tolerance is 0 by default; if the user gives a tolerance (e.g. 2%), apply it. - Extended:
bill.ExtendedCostvsPO line ExtendedCostfor the billed qty. - Over-bill: billed qty across all bills for a PO line exceeds
OrderQty-> over-billing flag. - Unmatched: bill line has no
POOrderNbrand noPOReceiptNbrand is a goods line -> unmatched (true GL/expense lines are expected and noted separately).
Bulk mode - find exception bills in a window
To audit rather than check one bill:
list_records(entity="Bill",
filter="Status eq 'Pending Approval' and Date gt datetimeoffset'<start>'",
expand="Details", select="Type,ReferenceNbr,Vendor,Amount,Status,Date", top=200)Then run the per-line rules on each; report only bills with at least one variance or unmatched goods line.
Output format
Bill: [010042](url) Vendor 100234 Amount 4,150.58 Status Pending Approval
Line 1 INV ABC-12345 Qty 3 @ 245.35 PO P010001/1 (ord 245.35) R010001/1 (recv 3) ✅ Match
Line 2 INV ... Qty 5 @ 12.00 PO P010001/2 (ord 11.50) ⚠ Price variance +0.50/ea
Line 3 Accrued Warranty Qty 1 @ 4150.58 (no PO - GL line) ℹ Unmatched by design
Result: 1 match, 1 price variance, 1 GL line. Recommend reviewing line 2 before release.Tips
- A clean three-way match is a precondition for releasing a bill - surface variances before anyone hits Release.
- Hand any single problem document to
doc-doctorfor a deeper why-is-this-stuck diagnosis. - For approval-state and on-hold context across many bills, pair with
p2p-monitor.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

