Workflows & examples
Common workflows
1. Quote to cash
- Build a quotation in Sales → Quotations (or generate one from a won CRM deal).
- The customer accepts; click Convert to Sales Order.
- Confirm the order — stock is reserved for product lines, and revenue may post now if the order uses the
on_ordermethod. - Create a Delivery Order; the warehouse picks and dispatches, posting a goods issue in Inventory (and revenue, if using
on_shipment). - Generate an invoice in Finance from the delivered order — it automatically nets off any revenue already recognized; Finance then collects payment.
2. Handle a customer return
- Open Sales → Customer Returns → New Return and reference the original order, delivery, or invoice.
- Select the returned lines and quantities.
- Confirm — stock is received back immediately.
- Raise a credit note in Finance against the original invoice to close the financial loop; the customer’s balance and inventory both reflect the reversal.
3. Recognize revenue on a milestone contract
- Turn on
finance.advanced_revenue_recognitionin ERP Configuration (Settings admin, one-time). - When creating the Sales Order, set Revenue Recognition Method to Milestone.
- As each contract milestone is reached, open the order and recognize it — entering the milestone’s own amount and tax.
- Invoice as usual whenever billing is due; the invoice automatically nets off everything already recognized so revenue is never double-counted.
4. Pay commissions for the period
- Define or verify rules in Sales → Commissions.
- Run the commission period; the system accrues per qualifying order or paid invoice, based on the configured event.
- Reps confirm their numbers in My Earnings; a manager approves the run.
- Approved amounts flow to Payroll or a standalone expense payout.
A worked example, end to end
One order, followed from quote to cash, with the numbers kept consistent at every hop.
The quote
A rep builds a quotation for 20 industrial pumps at 12,500,000 ₫ each. The customer’s price list applies a 6% tier discount on the line, so the line total is 20 × 12,500,000 × 0.94 = 235,000,000 ₫. VAT 10% is added per line, giving 258,500,000 ₫. The rep sends it — that requires quotations:send, not just :write.
Accepted
The customer accepts. The quote flips to accepted, and with sales.quotation_single_conversion ON (the default) it can convert exactly once — the guard that stops the same acceptance being sold twice.
Sales order
Converting creates a sales order that inherits every line, the discount, the tax, and the unit of measure. Confirming it reserves 20 pumps in the warehouse. If sales.price_lock_on_confirm is ON, the prices are now frozen against later price-list edits.
Delivery order
Fulfilment splits into four grantable steps — pick, pack, ship, deliver. Only deliver moves stock: it consumes FIFO cost layers, writes the stock movement in base units, and posts COGS. If the item tracks serials, the specific serials leave the warehouse here, and the ledger records exactly which ones.
Invoice
Invoicing the order produces the AR invoice. Under the default on_invoice recognition method, revenue posts now. If the tenant enabled finance.advanced_revenue_recognition and the order uses on_shipment, revenue was already recognized at the delivery step, and this invoice posts only the net remainder — never the same revenue twice.
Payment
The customer pays. AR clears, the bank transaction is matched, and the document chain now reads quote → order → delivery → invoice → payment, each hop clickable.
Commission
At period close, the commission run attributes the order to the rep. The rep sees it under My earnings; the manager approves the run with commission_runs:approve.
Every number above is carried, not re-typed. That is the point of the chain: change the quantity on the order and the delivery, invoice, and commission all follow from one place.
Data in and out
Comes from
| Source | What arrives | Where it is used |
|---|---|---|
| CRM | The won deal, the contact, the account | Quote header, payment terms |
| Product & Marketing | Sellable products, non-stock services | Quote and order lines |
| Inventory | Stock on hand, warehouses, serials and lots, UoM conversions | Reservation and delivery |
| Accounting | Chart of accounts, tax rates, exchange rates | Revenue, COGS and VAT posting |
Goes to
| Destination | What leaves | Effect |
|---|---|---|
| Inventory | Stock movements in base units | qty_on_hand decrements, FIFO layers consume |
| Finance | AR invoices, credit notes from returns | Receivables and collection |
| Accounting | Revenue, COGS and VAT journal entries | The ledger |
| Service Management | Service orders dispatched from an order | Field work |