Purchasing
#purchasing
#po
#orders
#suppliers
#procurement
#receiving
#email
#supplier-hold
#rules Raw .md
Purchase Orders
Manage supplier purchase orders, vendor holds, delivery schedules, document emailing, and dock receiving integration.
Routes:
/purchase-orders /purchase-orders/new /purchase-orders/:id Purchase Orders
The Purchase Orders module manages procurement with external vendors. It tracks order placement, supplier purchasing holds, expected shipping schedules, automated document emailing, and dock receiving integration.
Purchase Order Lifecycle & Automated Rules
stateDiagram-v2
[*] --> Draft : Create PO
Draft --> Ordered : Send / Confirm with Supplier
Draft --> Cancelled : Cancel
Ordered --> PartiallyReceived : Partial Dock Receipt (Auto)
Ordered --> Received : 100% Received (Auto)
PartiallyReceived --> Received : Remaining Lines Received (Auto)
Received --> Invoiced : AP Bills Matched & Posted (Auto)
PartiallyReceived --> ClosedShort : Close Unfulfilled Balance
Received --> PartiallyReceived : RTV Return Shipped (Auto-Revert)
Invoiced --> Closed : Archiving
Cancelled --> Closed : Archiving
Automated State Transition Rules Engine
The PO lifecycle rules engine continuously monitors warehouse and accounting events:
| Rule Name | Event Trigger | Evaluation Condition | Target State |
|---|---|---|---|
auto-receive-when-fully-received | Goods Receipt Created | All lines have Quantity Received >= Ordered Quantity | Received |
auto-partially-receive-when-some-received | Goods Receipt Created | Some lines have Quantity Received > 0 but not all | Partially Received |
auto-invoice-when-fully-invoiced-and-received | Supplier Invoice Posted | All lines are fully received and fully matched against posted AP bills | Invoiced |
auto-revert-to-partially-received-on-return | Purchase Return Shipped | Return shipment reduces net received quantity below ordered quantity | Partially Received |
Business Logic & Purchasing Controls
1. Supplier Purchasing Holds
- Hold Gate: If a vendor is marked On Purchasing Hold in Suppliers, the system warns operators during draft creation and strictly blocks advancing the PO to
OrderedorConfirmed. - Hold Release: Holds can only be lifted by users with authorized vendor management privileges.
2. Multi-Currency & FX Snapshotting
- Purchase orders snapshot the vendor’s active currency code and current exchange rate to base currency (
EUR) upon order creation. - Line items, unit costs, and purchase totals are transacted in the vendor’s currency, while base equivalent amounts are maintained for inventory capitalization and GL budgeting.
3. Closing Short vs. Backorder Cancellation
- If a supplier is unable to deliver the remaining units on a partially received order, an operator can click Close Short.
- Closing short transitions the PO status to
Closed Short, releasing open on-order stock reservations from demand planning without leaving orphaned purchase commitments.
Step-by-Step Workflows
1. Creating and Sending a Purchase Order
- Go to Purchasing → Purchase Orders (
/purchase-orders). - Click New Purchase Order (
/purchase-orders/new). - Select the Supplier. Currency, payment terms, and vendor addresses fill automatically.
- Set the Expected Delivery Date and destination Receiving Warehouse.
- Add line items, quantities, and agreed unit costs.
- Click Save as Draft, then click Send to Supplier to advance status to
Ordered. - Click Email to generate and transmit the branded Typst PDF purchase order.
2. Receiving and Invoice Matching
- When goods arrive, dock staff receive items in Inventory → Receiving. The PO automatically updates to
Partially ReceivedorReceived. - When the vendor bill arrives, navigate to Purchasing → Supplier Invoices to match lines against the receipt note and post to Accounts Payable. Once fully billed, the PO moves to
Invoiced.
Field Reference
| Field | Description |
|---|---|
| Supplier | Vendor account receiving the purchase order. |
| PO Number | Unique procurement identifier (e.g. PO-2026-00067). |
| Expected Delivery Date | Anticipated arrival date at the receiving dock. |
| Receiving Warehouse | Target warehouse facility for goods receipt. |
| Currency & FX Rate | Sourcing currency and exchange rate to base currency. |
| PO Status | Stage (Draft, Ordered, Partially Received, Received, Invoiced, Closed Short). |
| Unit Cost | Agreed purchase price per unit in supplier currency. |
| Supplier Hold | Warning indicator shown if vendor is on operational hold. |
Field Reference & Data Dictionary
Key database fields, input parameters, and definitions associated with this workflow screen:
| Field / Parameter | Display Name | Description & Rules |
|---|---|---|
| vendor_id | Supplier | Vendor account receiving the order. Sets currency, default AP account, and payment terms. |
| order_number | PO Number | Unique purchase order identifier (e.g. PO-2026-00067). |
| expected_date | Expected Delivery Date | Target date goods should arrive at the receiving dock. |
| fulfillment_location_id | Receiving Warehouse | Warehouse destination where inbound goods will be received. |
| currency_code | Currency | Purchasing currency and exchange rate snapshotted from supplier settings. |
| state_code | PO Status | Order state (Draft, Ordered, Partially Received, Received, Invoiced, Closed Short, Cancelled). |