AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The group-scoped human-facing system id (VI-…).
typeString String!The kind of record — always VendorInvoice here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: draft | captured | cancelled.
parentIdID ID!The parent PurchaseOrder; for a VendorInvoice parentId!== rootId.
rootIdID ID!The org-group family root.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
invoiceOrgVendorIdID 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).
invoiceNumberString 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.
invoiceDateString String!The vendor invoice date (UTC ISO-8601 — their paper date, not our capture instant).
matchLinesVendorInvoiceMatchLine [VendorInvoiceMatchLine!]The merchandise match lines (<=24, one per PO line) — at-least-one-of with actualComponents (the Contact substance stance).
actualComponentsLandedCostComponent [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).
totalMoneyEntryOptional vendor-stated grand total (informational — the lines/components are the match facts); in the PO currency.
notesStringOptional free-text notes (max 4096).
matchStatusVendorInvoiceMatchStatusCAPTURE-stamped match outcome (absent while draft): flagged never blocked the capture — it IS the approval queue until.
matchFlagsVendorInvoiceMatchFlag [VendorInvoiceMatchFlag!]CAPTURE-stamped discrepancies (first-8 named; port-written, never caller data).

Used by