16 lines
1.5 KiB
Markdown
16 lines
1.5 KiB
Markdown
# Phase 2B: purchase orders
|
|
|
|
Purchase orders turn active supplier-material quotes into private, organization-scoped procurement records. They are not goods receipts, invoices, stock movements, or supplier payment records.
|
|
|
|
| Method | Route | Permission | Purpose |
|
|
| ------ | --------------------------- | ------------------ | --------------------------------------------------- |
|
|
| GET | /purchase-orders | procurement.read | Page through orders, optionally filtered by status |
|
|
| GET | /purchase-orders/:id | procurement.read | Read an order and its immutable line snapshots |
|
|
| POST | /purchase-orders | procurement.manage | Create a draft from active supplier-material quotes |
|
|
| POST | /purchase-orders/:id/issue | procurement.manage | Issue a draft order |
|
|
| POST | /purchase-orders/:id/cancel | procurement.manage | Cancel a draft order |
|
|
|
|
Each line snapshots the material name, code, unit, supplier SKU, unit price, and line total. The header snapshots its currency and total. One currency is accepted per order, and quantities below the supplier's configured minimum are rejected.
|
|
|
|
Orders begin as `DRAFT`. They can become `ISSUED` or `CANCELLED` exactly once, with an audit record for each transition. Issued orders cannot be changed or cancelled in this phase. Partial goods receipts will be designed separately before any stock movement is introduced.
|