Skip to content

JNY-COM-ORD-006Vendor stock arrives through partial receipts

Markdown

JNY-COM-ORD-006

Vendor stock arrives through partial receipts

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindJourneyProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1End-to-endNone

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Goal
Acquire stock from a vendor, record each delivery at its landed cost and resolve the purchasing remainder.

Steps

#SurfaceActionCapabilityExpectedProvenance
1createVendorCreate the Acme Supply vendor.CAP-COM-ORD-017The stored supplier email uses lower-case spelling.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the vendor with its e-mail address lowercased, reads and lists it, replaces it at the version read (a stale one 409)
2issuePurchaseOrderPrepare and issue a purchase order for one hundred tote bags.CAP-COM-ORD-017The numbered purchasing document has issued status.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#drafts the order numbered with its line and issues it
3recordInventoryReceiptRecord the first sixty units arriving.CAP-COM-ORD-018The receipt creates a layer at the purchasing cost, fills waiting backorders and leaves a partially received document.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#records the first receipt (10 at the order line’s cost), fills the two backorders in its transaction, and the order is partially received
4recordInventoryReceiptRecord the remaining units with a revised cost, a reason and freight.CAP-COM-ORD-018A second acquisition layer includes allocated freight and receipt progress reaches received.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#records the second receipt at 1200 with its reason and 50 of landed cost per unit, and the order is received
5readInventoryValuationReview the inventory valuation.CAP-COM-ORD-018Layer value is compared with the quantity on hand and reconciliation explains the result.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#values the shirt L item at Σ the layers (3 at zero from the movement route, 10 × 1000, 10 × 1250 = 22500), reconciled with 23 on hand
6stampInventoryPostingsPostedProcess the receipt facts through Accounting.CAP-COM-ORD-018Successful postings mark the facts posted, leaving no unposted receipt facts.test
services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lists the facts unposted (the two receipts’), stamps them posted under Accounting’s reference, and lists none unposted after

Alternate and Failure Paths

PathFrom stepConditionPath takenOutcomeProvenance
alternate4Ten ordered units will not arriveClose the partially received purchase orderThe outstanding ten are cancelled and the document is closedtest
services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#closes an issued order after 90 of 100: cancelled_quantity 10, status closed; cancelling it instead is refused
failure4The delivery exceeds the outstanding quantityRefuse the receipt before applying its writesNo receipt or related records are createdtest
services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses a receipt beyond what the line has open (over_receipt) and a receipt against a received order, writing nothing

Assertions

IdStatementProvenance
01The initial receipt satisfies waiting backorders in oldest-first order.test
services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#fills the two backorders at the first receipt, oldest first, converting them to committed; the shelf shows 58 available after
02The valuation totals the acquisition layers and compares their quantity with stock on hand.test
services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#values the item after at 30 × 1200 = 36000, reconciled with the ledger’s on-hand of 30
03Each receipt posting fact is posted once.test
services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#lists the unposted facts by date, stamps them posted once under Accounting’s reference, and refuses another reference on a posted fact

End-to-end policy: none: The implemented purchasing journey is through the API; the pinned console provides no vendor, purchase-order or valuation screens.

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.