Procurement
Overview
Purchase orders, goods receipts, vendors, and stock transfers. Receipts and transfers feed stock and then the inventory publish path.
Code map
| Piece | Path |
|---|---|
| Purchase order | src/modules/operations/purchase-order |
| State machine | purchase-order-state-machine.ts |
| Goods receipt | src/modules/operations/goods-receipt |
| GRN state machine | goods-receipt-state-machine.ts |
| Transfer | src/modules/operations/stock-transfer |
| Vendor | src/modules/commerce/vendor |
| Schema | 32-procurement.prisma, 22-partner.prisma |
Purchase order transitions
| From | To |
|---|---|
DRAFT | SUBMITTED, CANCELLED |
SUBMITTED | PARTIALLY_RECEIVED, RECEIVED, CANCELLED |
PARTIALLY_RECEIVED | RECEIVED, CLOSED, CANCELLED |
RECEIVED | CLOSED |
CANCELLED, CLOSED | none |
Goods receipt transitions
| From | To |
|---|---|
PENDING_QC | QC_IN_PROGRESS, QC_COMPLETE, PUTAWAY_PENDING, REJECTED |
QC_IN_PROGRESS | QC_COMPLETE, PUTAWAY_PENDING, REJECTED |
QC_COMPLETE | PUTAWAY_PENDING, PUTAWAY_IN_PROGRESS, COMPLETED |
PUTAWAY_PENDING | PUTAWAY_IN_PROGRESS, COMPLETED |
PUTAWAY_IN_PROGRESS | COMPLETED |
COMPLETED, REJECTED | none |
Implementation behavior
PENDING_QCcan move directly toPUTAWAY_PENDING. QC can be skipped by that edge.Business intent
Whether a tenant setting is supposed to remove that edge is not established. The map allows it.
Status
Requires business confirmation if operators must not skip QC.
Events
Goods receipt and stock transfer enqueue stock.sync.requested and/or stock.received inside the workflow transaction. stock.received wakes fulfillment allocation.
Workflow: Goods receipt.
API surface
Purchase order and goods receipt controllers. OpenAPI for fields.