AlmondTill/G3N API

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

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 (RC-…).
typeString String!The kind of record — always Receipt here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: draft | posting | posted | cancelled.
parentIdID 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.
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.
logicalFacilityIdID 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).
organizationIdID ID!The buying org — spine-stamped from the parent PO at birth (the attribution symmetry).
lineCountInt 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.
nextLineNoInt 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.
linesReceiptLine [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.
landedComponentsLandedCostComponent [LandedCostComponent!]The landed-cost ESTIMATE components — allocated into the receive unit cost at post via allocateProportionally (EXACT conservation); trued up at VI capture.
walkReceiptWalkThe 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.

Used by