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 human-readable id, shaped like IN-… — stable for the record’s life. |
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 record’s current state — one of issued, closed or voided. |
parentId | ID ID! | The order's parent — the LF or org; for an Invoice parentId!== rootId. |
rootId | ID ID! | The id of your organization group — every record of yours carries the same one. |
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 id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten. |
refCaptions | RefCaption [RefCaption!]! | The captions of the records this one refers to, composed for you — 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. |
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. |
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. |
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. |