# 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](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (IN-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Invoice` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: issued \| closed \| voided. |
| `parentId` | [ID](/types/#scalars) `ID!` | The ORDER's parent — the LF or org; for an Invoice parentId!== rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/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](/types/#scalars) `ID!` | The invoiced Order. |
| `organizationId` | [ID](/types/#scalars) `ID!` | The selling Organization (copied from the Order at issue — attribution). |
| `currency` | [String](/types/#scalars) `String!` | The order currency (copied at issue; FX never touches captured figures). |
| `taxMode` | [InvoiceTaxMode](/types/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](/types/OrderCustomer/) | The order's inline customer capture, copied at issue. |
| `taxJurisdictionId` | [ID](/types/#scalars) | The order's captured ORIGIN jurisdiction, copied at issue (audit). |
| `paymentState` | [String](/types/#scalars) `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](/types/#scalars) `String!` | The fulfillment rollup, ANIMATED: unfulfilled → partial → fulfilled — per-line FIFO delivery allocation over the Order’s fulfilledQty stamps. |
| `recognitionState` | [String](/types/#scalars) `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](/types/#scalars) `Int!` | Σ snapshot-line bases in minor units (exact telescoping shares). |
| `discountTotalMinor` | [Int](/types/#scalars) `Int!` | Σ snapshot-line discount shares (line + order-level), minor units. |
| `taxTotalMinor` | [Int](/types/#scalars) `Int!` | Σ snapshot-line tax in minor units (INSIDE the captured figures under inclusive taxMode — disclosed, not double-counted). |
| `totalMinor` | [Int](/types/#scalars) `Int!` | The invoiced total in minor units (mode-aware line totals summed). |
| `lines` | [InvoiceLine](/types/InvoiceLine/) `[InvoiceLine!]!` | The IMMUTABLE snapshot lines (1..45); the notedBaseDeltaMinor rollups are the ONE post-issue stamp lane. |

## Used by

- [invoice](/reference/invoice/invoice/)
- [issueInvoice](/reference/selling/issueInvoice/)
- [voidInvoice](/reference/invoice/voidInvoice/)
