Receipt
object type
Over-receipt refuses CONFLICT/THREE_WAY_MATCH (the PO declared receive.match_flag form; tolerance ZERO until); under-receipt is partial, first-class — the next receipt is a NEW doc. posted is the immutable NON-doomed fact (corrections are compensating movements, never edits); cancelled is the doomed terminal (lists filter it). Re-running post RESUMES a stalled walk; on a healthy in-flight receipt it refuses CONFLICT/IN_PROGRESS naming the progress; one receipt posts against a purchase order at a time (its receivingReceiptId).
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 (RC-…). |
type | String String! | The kind of record — always Receipt here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: draft | posting | posted | cancelled. |
parentId | ID ID! | The parent PurchaseOrder (SPEC_CATALOG: PO per-LF — the saga this doc advances; receipts enumerate via the generic parent-children walk); for a Receipt 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. |
logicalFacilityId | ID ID! | The receiving LogicalFacility — IMMUTABLE at birth (the Transfer LF-pair stance; wrong LF = cancel + recreate); must be named by >=1 parent-PO line; ACTIVE-re-checked at post (the SL-b use-time stance). |
organizationId | ID ID! | The buying org — spine-stamped from the parent PO at birth (the attribution symmetry). |
lineCount | Int Int! | Rollup: the LIVE line rows on this receipt (0..1000) — maintained in the SAME transaction as every line mutation. ALWAYS <= nextLineNo - 1: removed numbers are never reused. |
nextLineNo | Int Int! | The MONOTONIC next lineNo this receipt will assign (born 1; +1 per minted line; a removed number is NEVER reused). Ceiling 1000 + 1 = the assignment exhausted. |
lines | ReceiptLine [ReceiptLine!]! | The lines — child rows (RCPTLINE#) read LAZILY as a whole (<= 1000, in lineNo order; the 12-line embedded ceiling and its 7N+2 transaction bound retired: the post WALKS). Page them with receiptLines; edit wholesale (the diff rule) or through addReceiptLines · updateReceiptLine · removeReceiptLines while draft. Fixed at post — the chunk that books a line stamps its merchandiseUnitCost / landedUnitCost on the row. |
landedComponents | LandedCostComponent [LandedCostComponent!] | The landed-cost ESTIMATE components — allocated into the receive unit cost at post via allocateProportionally (EXACT conservation); trued up at VI capture. |
walk | ReceiptWalk | The post walk in flight: present EXACTLY while status is posting — kind post · cursor = the next lineNo to land in stock (cursor − 1 of lineCount landed) · chunks so far · lineCount · startedAt · the machine executionArn once started · stalledAt + problem when a step failed past its retries. Null on every other status; cleared by the LAST chunk in the same transaction that lands posted. Re-run post to RESUME a stalled walk; on a healthy one it refuses CONFLICT/IN_PROGRESS naming the progress. |