Workflow: Purchase to Pay
Modules involved: Purchase (RFQ · Quotations · Purchase Orders · Vendor Invoices) · Warehouse (Goods Receipt) · Payments
Who uses it: Purchasing manager, Warehouse manager, Finance, Vendors
Typical duration: 1 day – 4 weeks (depends on vendor lead times)
Overview
The complete procurement workflow: from an internally identified need (request for quotation) to paying the vendor invoice and receiving goods into stock. Managed primarily by the purchasing and warehouse teams.
Flow diagram
[REQUEST FOR QUOTATION (RFQ)]
│ status: Draft (1) → Approved (2) → Rejected (3) / Canceled (4)
│ ↓ Internal approval → sent to vendors
│
[RECEIVED QUOTATIONS]
│ vendor responds via portal or manually
│ status: Draft (1) → Accepted (2)
│ ↓ Select the winning quotation → create Purchase Order
│
[PURCHASE ORDER (PO)]
│ status: Draft (1) → Approved (2) → Rejected (3) / Canceled (4)
│ order_status: Not Started (1) → In Progress (2) → Completed (3)
│ delivery_status: 0 = not delivered / 1 = delivered
│ ↓ Goods arrive at warehouse → Goods Receipt Note
│
[GOODS RECEIPT NOTE]
│ created automatically or manually from PO
│ stock updated in warehouse
│ ↓ Invoice received from vendor
│
[VENDOR INVOICE]
│ payment_status: unpaid → partially_paid → paid
│ ↓ Record payment
│
[VENDOR PAYMENT]
│
[CYCLE CLOSED ✓]
Step by step
1. Request for Quotation (RFQ) — Identifying the need
Where: /admin/purchase/purchase_request
How it is created:
- Manually: Add RFQ button — fill in which products are needed, quantities, deadline
- Automatically: from a Manufacturing Order when materials are missing from stock (
purchase_request_idset on MO)
Key fields:
| Field | Notes |
|---|---|
| RFQ name | Descriptive internal title |
| Department | The requesting department |
| Assigned to | The staff member making the request |
| Required date | The deadline for the need |
| Items | Products + required quantities |
RFQ statuses:
| Code | Status | Description |
|---|---|---|
| 1 | Draft | Created, not submitted for approval |
| 2 | Approved | Internally approved — sent to vendors |
| 3 | Rejected | Rejected |
| 4 | Canceled | Cancelled |
When transitioning to Approved status, the system calls
update_item_pur_request()to sync items with the purchasing catalog and logs the transition automatically.
2. Received Quotation — Vendor response
Where: /admin/purchase/myquotations
How the quotation arrives:
- Vendor portal: vendor receives a link and fills in the quotation online
- Manually: operator enters the quotation received by email/phone
- Upload: PDF document attached with prices entered manually
Key fields on the quotation:
| Field | Notes |
|---|---|
| Vendor | Link to the vendor record |
| Associated RFQ | The originating request |
| Expiry date | Quotation validity |
| Items + prices | What the vendor offers and at what price |
| Payment terms | Commercial credit days |
Quotation statuses:
| Code | Status | Description |
|---|---|---|
| 1 | Draft / Pending | Quotation received, not accepted |
| 2 | Accepted | Selected winning quotation |
Comparing quotations:
You can receive multiple quotations for the same RFQ and compare them side by side before selecting the vendor.
3. Purchase Order (PO) — The legal commitment
Where: /admin/purchase/purchase_order
Creation:
- From the accepted quotation: Create Order button — automatically pulls the vendor and items
- Directly:
/admin/purchase/pur_order→ fill in manually
PO statuses:
| Field | Code | Description |
|---|---|---|
status |
1 | Draft — unconfirmed |
status |
2 | Approved — confirmed and sent to vendor |
status |
3 | Rejected |
status |
4 | Canceled |
order_status |
1 | Not Started — delivery has not begun |
order_status |
2 | In Progress — partial delivery or in progress |
order_status |
3 | Completed — all items received |
delivery_status |
0 | Not delivered |
delivery_status |
1 | Fully delivered |
Important fields:
| Field | Notes |
|---|---|
Payment terms (days_owed) |
Commercial credit days from delivery |
| Estimated delivery date | Deadline promised by vendor |
| Associated contract | If a framework contract exists with the vendor |
| Destination warehouse | Where the goods will be received |
Sending to vendor:
Send button → automatic email with the order PDF and portal link. The vendor confirms receipt and can update the delivery status.
4. Goods Receipt Note — Receiving the goods
Where: /admin/warehouse/manage_purchase
Creation:
- Automatic: on PO approval or when
order_statuschanges → the system creates the receipt note via hookcreate_goods_receipt - Manual: from the confirmed PO → Create Receipt Note button
At receipt:
- Warehouse operator physically checks goods against the receipt note
- Fills in the quantities actually received (can be partial)
- Notes discrepancies (shortages, damages)
- Saves — stock is automatically updated in the configured warehouse
Key fields:
| Field | Notes |
|---|---|
| Receipt note code | Generated automatically with configurable prefix |
| Associated PO | Link to the originating order |
| Items + quantities | What was actually received |
| Warehouse | Location where goods are received |
| Receipt date | Physical date of receipt |
If the receipt is partial,
delivery_statusremains 0 and a second receipt note can be created for the remaining delivery.
5. Vendor Invoice — The payment request
Where: /admin/purchase/myinvoices
Creation:
- Automatically from PO or Contract: if the
create_invoice_byoption is configured - Manually: Add Vendor Invoice button — enter the data from the received invoice
- Vendor upload: vendor uploads the invoice via portal
Vendor invoice statuses:
payment_status |
Description |
|---|---|
unpaid |
Unpaid — no payment recorded |
partially_paid |
Partially paid — amount paid < total |
paid |
Fully paid |
The status is calculated automatically: if the sum of all payments recorded in
pur_invoice_payment= invoice total →paid. If 0 < paid < total →partially_paid.
Key fields:
| Field | Notes |
|---|---|
| Vendor invoice number | The number on the received invoice |
| Vendor | The vendor record |
| Associated PO | The originating order |
| Due date | Calculated from invoice_date + days_owed |
| Total | Amount on the invoice |
6. Vendor Payment — Settling the liability
Where: From the vendor invoice → Record Payment button
Payment fields:
- Amount
- Payment date
- Payment method (wire transfer, cash, etc.)
- Transaction reference (payment order number / bank statement)
- Payment approval status (if the approval workflow is active)
Multiple payments:
Successive partial payments can be recorded — each is logged in pur_invoice_payment. The invoice moves to partially_paid and subsequently to paid when the total is covered.
What is created automatically
| Event | Created automatically |
|---|---|
| RFQ approved | Email notification to vendors; items synced to catalog |
| Quotation accepted | Link pur_orders.sales order → winning quotation |
| PO approved | Hook create_goods_receipt → receipt note initiated |
| Receipt note saved | Stock updated in warehouse; delivery_status updated on PO |
PO order_status → 2 |
delivery_status set to 1 with current date |
| Cumulative payments = invoice total | payment_status → paid automatically |
Points where the workflow may stall
| Problem | Likely cause | Solution |
|---|---|---|
| Vendor cannot see the portal | Vendor account not created or no portal access | Check /admin/purchase/vendors → portal access email |
| Goods receipt note not generated | Hook disabled or PO not approved | Approve the PO first; check module settings |
| Stock not updated | Warehouse not associated on the receipt note | Fill in the warehouse field on the receipt note |
Vendor invoice remains unpaid |
Payment not recorded in CRM | Add the payment record manually from the invoice |
| Two receipt notes for the same PO | Partial delivery not properly handled | Normal — partial receipt notes are summed; check delivery_status |
Relevant reports
- Purchase Reports —
/admin/purchase/myreports— spending by vendor, period, category - Purchase Orders List — filters on
delivery_statusfor undelivered orders - Inventory History —
/admin/warehouse/warehouse_history— stock entries per vendor
Modules involved — detailed documentation
- Purchase Items · Vendors
- RFQ · Received Quotations
- Purchase Orders · Purchase Contracts
- Goods Receipt Note
- Vendor Invoices · Debit Notes
Complete the three-way match (Purchase Order + Goods Receipt + Vendor Invoice) before approving any supplier invoice for payment — this is the primary control that prevents paying for goods that were never delivered.
Do not approve a vendor invoice before the Goods Receipt Note is confirmed in the warehouse. Approving without GRN confirmation pays for goods whose delivery you cannot yet verify — a common fraud and error vector.