Purchase orders (PO)
Create a PO by hand (vendor, warehouse, quantity/price lines), submit it for approval, and approve or reject it. Only drafts can be edited or deleted.
A purchase order (PO) is the "we are buying this" document: which supplier, which warehouse it goes to, and exactly what quantities at what prices. Use it whenever you need to buy goods from a supplier. Every PO starts as a draft — nothing auto-generates a PO from OMS stock-outs.
Create a PO in 4 steps#
- Create the PO (draft): pick the vendor (from shared_vendors), the warehouse, and add at least one line item (product, quantity > 0, unit price ≥ 0). The PO number (PO-000001) is assigned automatically, and subtotal / total = subtotal + tax are summed for you.
- Submit for approval: draft → pending_approval. A PO with no line items cannot be submitted.
- Approve (pending_approval → approved) or reject (back to draft). Rejected POs can be fixed and resubmitted.
- Release to WMS (approved → released) or build an ASN first — see the ASN page. Released POs create a WMS inbound receipt (idempotent: releasing twice links the same receipt, it never duplicates it).
Fields to fill in
- Vendor (required): from the shared vendor list (shared_vendors), the same list WMS suppliers use. The vendor must be active and belong to your organization.
- Warehouse (required): in standalone mode you pick from the Purchase-maintained warehouse list (purchase_warehouses); in wms_sync mode the list comes from WMS warehouses (wms_warehouses). This is set in Purchase settings.
- Lines (at least one): product, quantity (> 0), unit price (≥ 0). Each line_total and the PO subtotal/total are calculated automatically.
- Merchant (3PL only): if your organization is a 3PL (company_type = 3pl), a new PO must name the merchant (cargo owner); for standard organizations it is optional.
- Optional: order date, expected delivery date, currency, notes.
Email the PO to the supplier#
- PO detail page → "Send to supplier": a dialog opens with recipient / CC / subject / body pre-filled and the PO PDF attached (generated server-side).
- The recipient defaults to the vendor's po_email (a field on vendor master data), falling back to contact_email when empty.
- The release-confirm dialog has an "also email the supplier" checkbox, checked by default — release the PO and notify the supplier in one step.
- Sending goes through Resend (email templates in six languages); every send is written to the PO timeline. Without a Resend key it degrades to a log entry instead of failing.
Auto actions on approval (switches)#
- auto_create_asn_on_approve: when approval is done, automatically build an ASN from the PO (lines, merchant, warehouse, expected date copied over; carrier defaults to the vendor’s preferred_carrier).
- auto_push_asn_to_wms: after the auto ASN is built, automatically push it to WMS (creates the inbound receipt and writes wms_receipt_id).
- If the auto ASN fails, approval is NOT rolled back — you get an auto_asn_warning and just build the ASN by hand.
- Both switches live in Purchase settings and are off by default.
