AlmondTill/G3N API

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

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 (IN-…).
typeString String!The kind of record — always Invoice here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: issued | closed | voided.
parentIdID ID!The ORDER's parent — the LF or org; for an Invoice 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.
orderIdID ID!The invoiced Order.
organizationIdID ID!The selling Organization (copied from the Order at issue — attribution).
currencyString String!The order currency (copied at issue; FX never touches captured figures).
taxModeInvoiceTaxMode 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.
customerOrderCustomerThe order's inline customer capture, copied at issue.
taxJurisdictionIdIDThe order's captured ORIGIN jurisdiction, copied at issue (audit).
paymentStateString 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).
fulfillmentStateString String!The fulfillment rollup, ANIMATED: unfulfilled → partial → fulfilled — per-line FIFO delivery allocation over the Order’s fulfilledQty stamps.
recognitionStateString 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).
subtotalMinorInt Int!Σ snapshot-line bases in minor units (exact telescoping shares).
discountTotalMinorInt Int!Σ snapshot-line discount shares (line + order-level), minor units.
taxTotalMinorInt Int!Σ snapshot-line tax in minor units (INSIDE the captured figures under inclusive taxMode — disclosed, not double-counted).
totalMinorInt Int!The invoiced total in minor units (mode-aware line totals summed).
linesInvoiceLine [InvoiceLine!]!The IMMUTABLE snapshot lines (1..45); the notedBaseDeltaMinor rollups are the ONE post-issue stamp lane.

Used by