Invoice
object type
A sales Invoice — the billing/revenue-recognition document generated from an Order: an IMMUTABLE line snapshot at issue (captured prices/discounts/tax COPY, telescoping-prorated exactly for the 1..N partial model — a full invoicing sums to the order figures EXACTLY). One order → one-or-many invoices. Born issued by the bespoke issueInvoice op; corrections are NEW CreditNote/DebitNote documents, NEVER an edit — no update surface exists. The GAAP recognition trail is reports-only; the three rollup vectors are ANIMATED derived read-models.
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 (IN-…). |
type | String String! | The kind of record — always Invoice here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: issued | closed | voided. |
parentId | ID ID! | The ORDER's parent — the LF or org; for an Invoice 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. |
orderId | ID ID! | The invoiced Order. |
organizationId | ID ID! | The selling Organization (copied from the Order at issue — attribution). |
currency | String String! | The order currency (copied at issue; FX never touches captured figures). |
taxMode | InvoiceTaxMode InvoiceTaxMode! | The pricing mode captured at issue — exclusive (sales_tax adds on top) or inclusive (vat_gst inside the captured prices); the note recompute reads THIS. |
customer | OrderCustomer | The order's inline customer capture, copied at issue. |
taxJurisdictionId | ID | The order's captured ORIGIN jurisdiction, copied at issue (audit). |
paymentState | String String! | The payment rollup, ANIMATED: unpaid → partial → paid — FIFO-by-issue money coverage derived from the Order’s net tenders (closed invoices pin first; a refund walks an ISSUED invoice back honestly — the newest invoice regresses first). |
fulfillmentState | String String! | The fulfillment rollup, ANIMATED: unfulfilled → partial → fulfilled — per-line FIFO delivery allocation over the Order’s fulfilledQty stamps. |
recognitionState | String String! | The recognition rollup, ANIMATED: deferred → partial → recognized — the deposits-until-delivery conversion; mirrors the fulfillment allocation until fiscal/service chunks diverge them. recognized + paid flips the invoice closed (system:fully_recognized_and_settled). |
subtotalMinor | Int Int! | Σ snapshot-line bases in minor units (exact telescoping shares). |
discountTotalMinor | Int Int! | Σ snapshot-line discount shares (line + order-level), minor units. |
taxTotalMinor | Int Int! | Σ snapshot-line tax in minor units (INSIDE the captured figures under inclusive taxMode — disclosed, not double-counted). |
totalMinor | Int Int! | The invoiced total in minor units (mode-aware line totals summed). |
lines | InvoiceLine [InvoiceLine!]! | The IMMUTABLE snapshot lines (1..45); the notedBaseDeltaMinor rollups are the ONE post-issue stamp lane. |