VendorInvoice
object type
A captured vendor bill: the 3-way match and the landed-cost TRUE-UP run from it at capture. NOT a payables subledger. Parent = the PO (the match is per-PO; N invoices per PO are legal — partial-shipment invoicing); invoiceOrgVendorId MAY differ from the PO vendor: ONE construct covers merchandise invoices (match lines) AND cost bills (landed ACTUAL components) — either or both, never neither. CAPTURE stamps matchStatus matched|flagged at tolerance ZERO (price/qty variance FLAGS, never blocks — the flag IS the approval queue until) and posts the landed true-up (actuals vs the receipts NOT-yet-trued estimates per component type -> cost_true_up value-only movements re-weighting each touched book at its CURRENT cost-bearing quantity; the sold-share stays a reports-only fact — the precedent). The (invoiceOrgVendor x normalized invoice number) UNIQ pair is the double-pay gate (CONFLICT/IDENTITY_TAKEN naming the holder; a cancelled holder is taken over). captured is the immutable fact (corrections are compensating entries, never un-capture); cancelled is the doomed terminal (lists filter it).
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The group-scoped human-facing system id (VI-…). |
type | String String! | The kind of record — always VendorInvoice here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: draft | captured | cancelled. |
parentId | ID ID! | The parent PurchaseOrder; for a VendorInvoice parentId!== rootId. |
rootId | ID ID! | The org-group family root. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
invoiceOrgVendorId | ID ID! | The BILLING OrgVendor — may differ from the PO vendor (a carrier/broker billing against this PO); defaults to the PO vendor at create. IMMUTABLE at birth (the marker leg). |
invoiceNumber | String String! | The vendor own invoice number (their token, RAW spelling, max 64; the trim+case-fold normalized leg rides the UNIQ pair marker — the double-pay gate). IMMUTABLE at birth. |
invoiceDate | String String! | The vendor invoice date (UTC ISO-8601 — their paper date, not our capture instant). |
matchLines | VendorInvoiceMatchLine [VendorInvoiceMatchLine!] | The merchandise match lines (<=24, one per PO line) — at-least-one-of with actualComponents (the Contact substance stance). |
actualComponents | LandedCostComponent [LandedCostComponent!] | The landed-cost ACTUAL components (<=8, amounts in the PO currency) — trued-up at capture against the posted receipts estimates of the SAME component type (first capture of a type consumes its estimates; later bills of that type add compensating deltas). |
total | MoneyEntry | Optional vendor-stated grand total (informational — the lines/components are the match facts); in the PO currency. |
notes | String | Optional free-text notes (max 4096). |
matchStatus | VendorInvoiceMatchStatus | CAPTURE-stamped match outcome (absent while draft): flagged never blocked the capture — it IS the approval queue until. |
matchFlags | VendorInvoiceMatchFlag [VendorInvoiceMatchFlag!] | CAPTURE-stamped discrepancies (first-8 named; port-written, never caller data). |