The revenue pipeline — five modules, one flow
Every Omani Rial that lands in your firm's bank starts as a phone call (M03 Lead) and ends as a payment record (M11). Five modules cooperate, every step stamps lineage so you can trace any payment back to its origin call. This chapter maps the flow + the data trail.
The 5 modules in concert
| # | Module | Number prefix | What it owns |
|---|---|---|---|
| 1 | M03 Leads | — | Pipeline stages, lead activities, conversion to client |
| 2 | M10 Quotes | QU/{YYYY}/{NNNN} | Fee proposals, line items, validity, conversion to invoice |
| 3 | M07 Jobs | JOB/{YYYY}/{NNNN} | Work execution; auto-drafts invoice on completion |
| 4 | M11 Invoices | INV / PI / CN / DN /{YYYY}/{NNNN} | Tax invoices, proforma, credit + debit notes, balance |
| 5 | M11 Payments | RCT/{YYYY}/{NNNN} | Receipts, allocations, advance balance |
Lineage — the data trail
Every conversion stamps both rows so the trail is bidirectional + permanent:
| Source → Target | Source column | Target column |
|---|---|---|
| Lead → Client | leads.converted_client_id | clients.source_lead_id (where applicable) |
| Lead → Quote | quotes.lead_id | (implicit) |
| Quote → Invoice | quotes.converted_to_invoice_id | invoices.parent_quote_id |
| Job → Invoice | jobs.id referenced | invoices.job_id |
| Proforma → Tax invoice | proforma.converted_to_invoice_id | tax_invoice.parent_invoice_id |
| Invoice → Credit note | invoice.has_credit_notes (computed) | credit_note.parent_invoice_id |
| Invoice ↔ Payment | via payment_allocations table | many-to-many |
Step-by-step — a quote-to-paid story
Lead captured (M03)
Sales pipeline → New lead. Stage starts at new. Walk through contacted → qualified → proposal → negotiation. Activity timeline captures every touchpoint.
Quote drafted (M10)
From the lead → Create quote. Inherits contact + estimated fee. Add line items (audit fee, OOP, VAT 5%). Save as draft → preview PDF → send via M17 → status flips to sent.
Quote accepted
Client emails back acceptance. Mark quote accepted. Lead stage moves to won. Convert lead to client (auto-creates M04 row).
Job created (M07)
From client detail → New job → TPL-AA Annual Audit. Wizard inherits the accepted quote's fee + line items. Auto-numbered
JOB/2026/0042. 12 workpapers seeded.Work happens
Tasks ticked, evidence attached, partner signs report. Status flips to completed.
Invoice auto-drafts (M11)
Per
m11.auto_invoice_on_completion=1, system auto-drafts a tax invoice inheriting the quote's lines + client T&Cs. Auto-numberedINV/2026/0042. Partner reviews, approves, sends.Client pays (M11)
Payment received. Record via Payments → New. Allocate to the invoice. Auto-numbered
RCT/2026/0042. Receipt PDF generated. Invoice flips to paid.Trace it back
From the payment row, click through: payment → invoice → job → quote → lead → first phone call. One unbroken trail.
The audit-firm revenue cycle (typical timing)
| Day | Event |
|---|---|
| D1 | Lead captured · independence check · stage new |
| D3 | Quote sent · stage proposal |
| D14 | Quote accepted · client converted · job created · stage won |
| D14-D70 | Job execution (TPL-AA: ~8 weeks) |
| D70 | Job completed · invoice auto-drafts |
| D71 | Invoice approved + sent |
| D101 (D71+30) | Standard payment terms |
| D101+ | If unpaid → status flips to overdue; M17 dunning fires |
Lifecycle stamps
Every state-changing operation stamps:
- Who (
updated_by) — the logged-in user - When (
updated_at) — ISO timestamp - What — specific column for that lifecycle (e.g.
approved_at,sent_at,cancelled_at,paid_in_full_at,written_off_at,converted_at) - Why — mandatory reason for cancel + write-off
So the row tells the full story without needing the audit log (though the audit log is also stamped for forensic depth).
Open any closed engagement → Invoices tab → click on the invoice → scroll to the Lineage card on the right. You'll see: linked job · parent quote · linked lead · client all as clickable links. Walk back through and notice every step is one click. If a partner ever asks "how did we win this client?", the answer is right here.
Don't manually create invoices that bypass the lineage. If you skip Lead → Quote → Job and just type a free-form invoice, you've broken the audit trail. M11 lets you do this (some firms have walk-in business), but for repeat audit clients always start from the lead/quote anchor.
Reports → Quote conversion shows: % of quotes accepted, average days lead-to-quote, lead-to-paid. Healthy audit-firm conversion: 30-50% of quotes accepted. Below 30% = pricing too high; above 60% = pricing too low. Use this to fine-tune fee ranges quarterly.