Receipt
object type
Over-receipt refuses CONFLICT/THREE_WAY_MATCH; 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 human-readable id, shaped like RC-… — stable for the record’s life. |
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 record’s current state — one of draft, posting, posted or cancelled. |
parentId | ID ID! | The parent PurchaseOrder; for a Receipt 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. |
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. 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. |