Skip to content

app.invoice_matches

TableRow level security on

Three-way matches of a payable invoice to a purchase order and a goods receipt (invariant 17). A receipt matches one invoice once; the variance is derived in app.invoice_match_results, and a payable invoice with an unresolved mismatch is never approved.

Primary key: id

Columns of app.invoice_matches
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.invoices on insert; never accepted from the caller and never changed.References app.organizations.id
invoice_iduuidNoPayable invoice matched.References app.invoices.id
purchase_order_iduuidNoPurchase order the invoice bills.References app.purchase_orders.id
goods_receipt_iduuidNoReceipt of that order the invoice bills. A receipt is matched once.References app.goods_receipts.id
resolution_notetextYesWhy a mismatch is accepted, recorded by someone other than the matcher.
resolved_byuuidYesPerson who accepted the mismatch.References app.people.id
resolved_attimestamp with time zoneYesWhen the mismatch was accepted.
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id