Official Technical Documentation & User Manual
User Manual › Volume 4: Sales, CRM & Accounts Receivable (Money Coming In)
Verified Guide • Updated 16 Oct 2026
User Manual Volume 4: Sales, CRM & Accounts Receivable (Money Coming In) Verified Guide

#10: Revenue, Tax Invoicing & Delivery Fulfillment Command Center & Studio

Updated 20 hours ago 19 min read 2 views
Volume 4 • Article #10 Routes: invoice/index • invoice/add • invoice/preview • invoice/settings

Revenue, Tax Invoicing & Delivery Fulfillment Command Center & Studio

A complete guide to generating SARS-compliant Tax Invoices, managing Accounts Receivable (AR) collections, enforcing customer credit limits, dispatching serialized Delivery Notes & Waybills (DN-) with Proof of Delivery (POD) sign-off, and configuring your Invoicing Customization Studio.

10.1 Plain-English Accounting: What Happens When You Issue a Tax Invoice?

In Article #09, we learned that a Quotation or Pro-Forma Invoice is a commercial offer that does not touch your General Ledger or deduct physical stock. By contrast, a Tax Invoice (INV-) is a legally binding accounting and tax document.

The moment an invoice transitions from Draft to an active billing status (such as Sent, Partially Paid, or Paid), Keystone X automatically executes two simultaneous double-entry journal postings and one physical inventory movement behind the scenes:

1. The Revenue & VAT Recognition Entry

Suppose you invoice a customer R 1,150.00 (R 1,000.00 Excl. VAT + R 150.00 @ 15% Standard VAT):

GL Account Account Type Debit (DR) Credit (CR)
1100 - Accounts Receivable (AR) Current Asset R 1,150.00 —
4000 - Sales Revenue Income — R 1,000.00
2200 - Output VAT Control (SARS) Current Liability — R 150.00

Why? Even if the customer hasn't paid cash yet, they now legally owe you R 1,150.00 (increasing your Accounts Receivable asset), you have earned R 1,000.00 in top-line revenue, and you owe R 150.00 in Output VAT to the revenue authority on your next VAT201 return.

2. The Perpetual Inventory & COGS Entry

If that invoice contained a physical stock item whose FIFO/WAVCO cost in your warehouse was R 600.00:

GL Account Account Type Debit (DR) Credit (CR)
5000 - Cost of Goods Sold (COGS) Direct Expense R 600.00 —
1200 - Inventory Asset Control Current Asset — R 600.00

Why? The item has left your shelf! Your warehouse asset value drops by R 600.00, and your Cost of Sales expense increases by R 600.00, allowing Keystone X to calculate your exact Gross Profit (R 1,000 − R 600 = R 400 / 40% Margin) in real time. Furthermore, any allocated Serial Numbers (S/N) are linked to the customer's warranty profile.

Separation of Financial Billing vs. Physical Logistics (Tax Invoice vs. Delivery Note):
Often, your warehouse dispatches goods in a van where the driver needs a document showing quantities and serial numbers for the customer's security guard to sign, without exposing sensitive prices or company profit margins. That document is the Delivery Note / Waybill (DN-). Keystone X lets you generate a Delivery Note automatically with every Tax Invoice, or create multiple partial Delivery Notes when backordered items ship in separate tranches.

10.2 The Revenue & Fulfillment Command Center (invoice/index)

Navigate to Sales & Receivables → Invoices (invoice/index) to open the Revenue, Invoicing & Delivery Fulfillment Command Center.

📸 [SCREENSHOT PLACEHOLDER: invoice-command-center-overview.png]

How to Capture: Navigate to /invoice/index in Ledger view. Ensure all 4 top KPI cards, the Workspace View Switcher (Ledger | Board | Dispatch Hub), the filter ribbon, and the Invoice Register table with status & fulfillment badges are visible.

Top Header Action Bar & Workspace Switcher
Control / Button Visual Style Exact Function & Destination
Workspace View Switcher
(Ledger | Board | Dispatch Hub)
Segmented Pill Group Switches the main canvas between:
  • Ledger (?view=list): Tabular register + Collections queue + 12-Month Revenue Analytics.
  • Board (?view=board): Drag-and-drop Kanban board organized by invoice lifecycle stages.
  • Dispatch Hub (?view=delivery): Dedicated Delivery Note & Waybill (DN-) logistics tracker and pending dispatch queue (shows a live red counter badge when paid/sent invoices await dispatch).
Studio Dark Outline Pill Opens the Invoicing & Delivery Customization Studio (invoice/settings) to configure stages, couriers, payment terms, numbering, and PDF branding.
Export CSV Success Outline Pill Triggers exportLedgerCsv(), downloading the currently visible Invoice Register rows into a timestamped CSV file (invoices_ledger_export_YYYY-MM-DD.csv) for external audit or Excel analysis.
Create Invoice Green Gradient Pill Opens the Tax Invoice Builder (invoice/add).
The 4 Executive KPI Cards
KPI Card Calculation Logic Sub-Metrics & Badges Shown
1. Total Active Billed Sum of total_amount across all non-draft, non-cancelled Tax Invoices. Displays total active invoice count and a muted pill showing how many Drafts are currently parked.
2. Collected Revenue Sum of amount_paid settled against invoices. Displays a live green progress bar and percentage pill (% Settled = Collected / Total Billed × 100).
3. Outstanding Receivable Sum of balance_due still owed by customers (Total Billed − Collected). Displays Overdue Risk in red (total rand value past its due_date) and the count of overdue invoices.
4. Delivery Fulfillment Total Delivery Notes & Waybills (DN-) generated. Displays three mini logistics pills: Pending (amber), Transit (blue), and Delivered (green).
Multi-Parameter Filter Ribbon

Below the KPI cards is a live server-side filter bar (GET /invoice/index) that persists across both the Ledger and Board views:

  • Search Box (q): Searches by Invoice Number (INV-0001), Customer Name, or Customer Purchase Order Number.
  • Lifecycle Stage (status): Filters by any custom stage configured in your Studio (e.g., Draft, Sent, Partially Paid, Paid, Overdue, Cancelled).
  • Fulfillment (fulfillment): Filters by physical logistics state (Pending Dispatch, Packing / Ready, In Transit / Out for Delivery, Delivered / POD Signed, or Not Applicable (Service)).
  • Date From (date_from) & Date To (date_to): Filters by Invoice Issue Date range, with a Filter submit button and a 1-click Reset (×) button.

10.3 Workspace 1: The Ledger View & Its 3 Internal Sub-Tabs

When viewing the Ledger (?view=list) workspace, a sub-navigation header provides three specialized operational tabs:

Sub-Tab A: Invoice Register (#ledger-all)

The complete master register of all Tax Invoices matching your active filters.

Column Contents & Interactive Elements
Invoice # Clickable bold link (e.g., INV-0042) opening the 360° Invoice Cockpit (invoice/preview/{id}). If the customer supplied a PO number, a badge PO: ... appears underneath.
Client Avatar initial badge + clickable link to the 360° Customer Profile (customer/profile/{customer_id}) + client email address.
Issued / Due Issue date on top; Due date underneath. If the invoice has an unpaid balance and due_date < today, the due date turns bold red with an exclamation icon.
Total / Balance Right-aligned gross invoice total on top. Underneath: either a red Due: R X,XXX.XX pill (if unpaid) or a green Settled check label.
Lifecycle Stage Color-coded status badge driven by your Customization Studio stages, accompanied by a visual settlement progress bar (0%–100%).
Fulfillment / Waybill Shows the current logistics badge: Delivered / POD (green), In Transit (blue), Packing / Ready (amber), N/A (Service) (grey), or Pending Dispatch. If a Delivery Note hasn't been created yet and the invoice isn't a service-only bill, a clickable + Create Waybill button opens the Quick Dispatch Modal directly from the row.
Action (… Dropdown)
  • Open Invoice & Dispatch Cockpit: Navigates to invoice/preview/{id}.
  • Edit Invoice Details: Navigates to invoice/edit/{id}.
  • Download Tax Invoice PDF: Streams the official PDF via invoice/pdf/{id}.
  • Generate Delivery Note / Waybill: Opens the Quick Dispatch Modal (if no waybill exists yet).
  • Delete Draft: Permanently deletes the record via invoice/delete/{id} (only available while in Draft status before GL posting).
Sub-Tab B: Collections & Overdue (#ledger-overdue)

Automatically filters the ledger down to delinquent accounts (balance_due > 0 and due_date < today) so your Credit Controller can chase overdue cash immediately.

  • Days Late Badge: Calculates exact calendar days overdue and color-codes severity (amber for 1–29 days late, red for 30+ days late).
  • 1-Click Capture Payment Button: Opens invoice/preview/{id}#paymentModal to receipt an incoming EFT or apply customer wallet funds.
  • 1-Click Send Reminder (Envelope Button): Fires an automated overdue dunning email (invoice/send/{id}) with the PDF attached directly to the client's billing contact.
Sub-Tab C: 12-Month Revenue Analytics (#ledger-analytics)

Presents an interactive Chart.js bar chart comparing Monthly Billed Revenue (Green) vs. Collected Cash (Blue) over the trailing 12 months, alongside a right-hand Lifecycle Breakdown card showing exact invoice counts and rand values sitting in every pipeline stage.

10.4 Workspace 2: The Revenue Pipeline Kanban Board (?view=board)

Click Board in the top-right workspace switcher to visualize your invoices as draggable cards arranged across columns representing each configured Lifecycle Stage (e.g., Draft → Sent → Partially Paid → Paid → Overdue).

📸 [SCREENSHOT PLACEHOLDER: invoice-kanban-board.png]

How to Capture: Click the Board pill at the top right of /invoice/index?view=board. Capture the horizontal Kanban columns showing stage totals, invoice cards, due-date badges, and quick action icons.

  • Column Headers: Show the stage dot color, stage name, total count of invoices in that stage, and the cumulative rand value of the column.
  • Drag-and-Drop Stage Transitions: Dragging a card from one column to another immediately fires an AJAX call to invoice/updateStatusAjax, updating the invoice's status and recalculating column totals without reloading the page.
  • Quick Card Footer Actions: Each Kanban card displays the due date, outstanding balance, an Eye icon (Open Cockpit), and a PDF icon (Download Tax Invoice PDF).

10.5 Workspace 3: The Dispatch Hub & Waybill Tracker (?view=delivery)

Click Dispatch Hub in the workspace switcher to open the dedicated logistics command center designed for your Warehouse Dispatchers, Drivers, and Fulfillment Coordinators.

📸 [SCREENSHOT PLACEHOLDER: invoice-dispatch-hub-waybills.png]

How to Capture: Click Dispatch Hub (/invoice/index?view=delivery). Capture the split screen showing the Active Delivery Notes & Waybills (DN-) register on the left and the Pending Dispatch Queue on the right.

Left Panel: Active Delivery Notes & Waybills (DN-)

Lists every generated Delivery Note across the business with five columns:

  1. Waybill # / Invoice: Displays the bold blue Delivery Note code (e.g., DN-0018) and links back to its parent Tax Invoice (INV-0042).
  2. Customer & Destination: Shows the client name and truncated delivery street address.
  3. Courier & Tracking: Displays the selected dispatch method (e.g., Company Fleet, The Courier Guy, DHL Express) and the Waybill Tracking Number badge.
  4. Logistics Status: Color-coded status pill (Pending Dispatch, Packing / Ready, In Transit, Delivered / POD Signed). Once delivered, displays the signed recipient's name underneath (Signed: John Sithole).
  5. Actions:
    • PDF Button: Downloads the unpriced Official Delivery Note / Waybill PDF (invoice/deliveryNotePdf/{dn_id}) complete with item quantities, serial numbers, and a physical POD signature block.
    • Update Button: Opens the Update Waybill & POD Status Modal (#updateDnStatusModal) to update courier tracking numbers, change logistics status, and record the Received By (Recipient Name) and Delivery / POD Notes once the driver returns or courier confirms delivery.
Right Panel: Pending Dispatch Queue

Automatically surfaces all active Tax Invoices that require physical fulfillment but do not yet have a Delivery Note generated.

Clicking Create Waybill on any card opens the Generate Delivery Note & Dispatch Waybill Modal (#quickDispatchModal), pre-populating the client's delivery address and letting the dispatcher choose the Courier Method, Initial Status, Tracking Number, Dispatch Date, and Driver Handling Instructions in seconds.

10.6 Creating & Editing a Tax Invoice (invoice/add & invoice/edit)

Clicking + Create Invoice opens the comprehensive Tax Invoice & Fulfillment Builder (invoice/add). Every field is engineered to prevent billing errors, enforce customer credit limits, and automate due-date and tax math.

📸 [SCREENSHOT PLACEHOLDER: invoice-builder-form-full.png]

How to Capture: Navigate to /invoice/add, select a customer so the Credit Limit check and Address Book populate, add two inventory items (one with a Serial Number selector visible), and capture the form including the Delivery Fulfillment & Waybill panel.

Part 1: Customer, Credit Governance & Commercial Metadata
Field / Control Field Name Behavior, Accounting Impact & Automation
Customer Required customer_id Selects the debtor account. Immediately triggers three live automations:
  1. Live Credit Limit Guard (#creditLimitAlert): Checks the customer's current account_balance + the new invoice total against their configured credit_limit. If exceeded, a prominent red Credit Limit Exceeded! warning banner appears showing exact Current Balance, Credit Limit, and Projected Balance.
  2. Payment Terms Sync: Selects the customer's default Payment Term (e.g., 30 Days EOM) and recalculates the Due Date.
  3. Branch & Address Book Fetch: Queries customer/getBranchesJson and customer/getAddressesJson to populate corporate branches and saved delivery addresses.
Billing Branch / Sub-Account billing_branch_id Appears automatically when the selected customer is a Corporate Head Office with sub-branches. Allows you to bill Head Office while attributing the delivery and branch code to a specific regional store or site.
Linked Project project_id Links the revenue and COGS of this invoice to a specific project in the Projects & Job Costing module for project profitability tracking.
Invoice Number invoice_number Auto-generated sequential number (e.g., INV-0043) based on your Studio prefix and padding settings, or customizable if manual overrides are needed.
Treasury Bank Account (Payment Details) bank_account_id Determines which company bank account EFT details print at the bottom of the Tax Invoice PDF. Leave on Use System Default Invoice Bank Account or override for specific currencies/divisions.
Lifecycle Stage status Sets the initial status (e.g., Draft to park without GL impact, or Sent to finalize and post to the General Ledger immediately).
Customer PO Number customer_po_number Records the buyer's official Purchase Order reference. (Note: If Require Customer PO Number is enabled in the Customization Studio, this field becomes mandatory with a red Required badge).
Billing & Delivery Address Book address_id & address_snapshot Select any saved site address from the customer's address book to auto-fill the 3-line Address Snapshot textarea. Because it is stored as an immutable snapshot on the invoice, future address changes on the customer profile will never corrupt historical tax invoices.
Issue Date, Payment Terms & Due Date issue_date, payment_terms, due_date Changing the Issue Date or Payment Terms automatically recalculates the Due Date using two distinct algorithms configured in your Studio:
  • Standard Net Days: Adds N calendar days directly to the Issue Date (e.g., Issue Date 10 Oct + 30 Days = 09 Nov).
  • End of Month (EOM): Jumps to the last day of the issue month first, then adds N days (e.g., Issue Date 10 Oct + 30 Days EOM = 30 Nov).
Part 2: Delivery Fulfillment & Waybill Automation Panel

Directly beneath the commercial metadata is a dedicated blue-bordered Delivery Fulfillment & Waybill Automation card:

  • Fulfillment Status (fulfillment_status): Set to Pending Dispatch, Packing / Ready, In Transit, Delivered / POD Signed, or Not Applicable (Service Only).
  • Courier / Dispatch Method (delivery_method): Choose from your Studio-configured fleet/courier list (e.g., Company Fleet / Driver, Client Collection (Ex-Works), The Courier Guy, RAM Hand-to-Hand, Digital / Electronic Delivery).
  • Tracking / Waybill Reference (tracking_number): Optional courier waybill reference.
  • Auto-Generate Delivery Note (DN-) Toggle Switch (auto_create_delivery_note): Checked by default when creating a new invoice. When enabled, saving the Tax Invoice automatically generates a companion DN-XXXX Waybill for all physical line items (Automatically turns off if you select Service Only or Digital Delivery).
Part 3: Line Items, Serial Numbers & Tax Engine

The Invoice Line Items grid supports both catalog inventory items and free-text service lines:

  • Item / Description (item_id[] + description[]): Selecting a catalog SKU automatically populates the Item Description, Selling Price, and Tax Rate. You can also choose -- Custom Item / Service -- to type an ad-hoc consulting or labor description.
  • Serial Number Allocation Selector (serial_numbers[]): Whenever you select a catalog item that has Serial Number Tracking enabled (`track_serials = 1`), an interactive blue Select S/N... dropdown appears directly beneath the description, listing every available `in_stock` serial number in your warehouse. Selecting a serial number prints `S/N: XXXX` on both the Tax Invoice and Delivery Note PDFs and starts the customer's warranty clock.
  • Qty (quantity[]) & Unit Price (unit_price[]): Multiplies quantity by unit price to calculate the row total.
  • Tax Selector (tax_type[]): Choose between Standard 15% (STD), Zero-Rated 0% (ZERO), or Exempt 0% (EXM).
  • Summary Footer (Subtotal, Discount, VAT & Grand Total): Supports an optional invoice-wide Discount Amount (discount_amount) which proportionally reduces the taxable base before calculating 15% Output VAT and the final Total Due.
Part 4: Attachments, Terms & Notes
  • Supporting Documents (attachments[]): Upload signed client POs, job cards, or spec sheets (`PDF`, `JPG`, `PNG`, `DOCX`, `XLSX`) to attach to the invoice record.
  • Terms & Conditions (terms): Rich-text editor pre-filled with your default Studio payment terms and late-interest clauses.
  • Client Notes (notes_client): Visible to the customer on the Tax Invoice PDF.
  • Internal Notes (notes_internal): Highlighted in amber with a lock icon; strictly private to staff and never printed on customer PDFs.

10.7 The 360° Invoice & Fulfillment Cockpit (invoice/preview/{id})

Clicking any invoice number opens the Invoice & Fulfillment Cockpit (invoice/preview/{id}), combining an interactive stage progression bar, a print-accurate Tax Invoice document preview, a multi-shipment Delivery Note manager, and a Credit Wallet-aware Payment Receipting engine.

📸 [SCREENSHOT PLACEHOLDER: invoice-preview-cockpit.png]

How to Capture: Open any active invoice at /invoice/preview/{id}. Capture the top Lifecycle Stepper Bar, the left-hand Tax Invoice document preview (showing Serial Numbers and Treasury Bank details), and the right-hand Delivery Notes & Payment History sidebar cards.

1. Top Action Bar & Interactive Lifecycle Stepper
  • Interactive Stage Stepper Bar: Displays every stage in your billing workflow as connected nodes. Clicking any stage node immediately transitions the invoice to that stage via AJAX (`updateStageFromCockpit()`).
  • Dispatch / Waybill Button: Opens the Generate Delivery Note & Partial Shipment Modal (#createDeliveryNoteModal).
  • Email Invoice Button: Dispatches the Tax Invoice PDF via email (`invoice/send/{id}`) to the customer.
  • Tax Invoice PDF Button: Opens/downloads the official SARS-compliant Tax Invoice PDF (`invoice/pdf/{id}`).
  • Record Payment Button: Appears whenever `balance_due > 0`. Opens the Record Payment & Wallet Modal (#paymentModal).
  • Issue Credit Note Button: Appears on finalized (`Sent`, `Paid`, `Partially Paid`, `Overdue`) invoices. Jumps directly to `CreditNote/create/{id}` pre-loaded with this invoice's items for a financial reversal or stock return.
2. Partial Shipments & Split Delivery Notes (#createDeliveryNoteModal)

What if a customer orders 10 laptops on one Tax Invoice, but you only have 6 in stock today and 4 arriving next week?

Clicking Dispatch / Waybill inside the Invoice Cockpit opens an advanced modal that includes a Line Items to Include in This Shipment table. Next to each product row, you can adjust the Dispatch Qty (delivered_qty[]) from `10` down to `6` for the first Delivery Note (`DN-0019`), and then generate a second Delivery Note (`DN-0020`) for the remaining `4` units next week!

3. Capturing Payments & 1-Click Credit Wallet Settlement (#paymentModal)

Clicking Record Payment opens the settlement modal with two distinct ways to clear the invoice's balance:

Option A: 1-Click Credit Wallet Settlement Banner
If the customer has pre-paid retainer funds or an unallocated overpayment sitting in their Customer Credit Wallet (credit_balance > 0), an interactive blue banner appears at the top of the modal showing their available wallet balance and an Apply Credit button (`payment/payFromWallet`). Clicking it settles the invoice (up to the available wallet balance) immediately without requiring a new bank deposit!
Option B: New External Payment Receipt (payment/record)
Record a fresh EFT, Card, or Cash payment by entering the Payment Amount (supports partial or full settlement), Payment Date, Payment Method, Bank Reference / Transaction ID, optional Proof of Payment (POP) file upload, and notes.

10.8 The Invoicing & Delivery Customization Studio (invoice/settings)

Navigate to Sales & Receivables → Invoices → Studio (`invoice/settings`) to tailor every rule of your billing and logistics engine across 5 dedicated configuration tabs.

📸 [SCREENSHOT PLACEHOLDER: invoice-customization-studio-tabs.png]

How to Capture: Open /invoice/settings. Capture the 5 left/top navigation tabs (Lifecycle Stages, Delivery & Couriers, Payment Terms, Numbering & PDF Templates, Workflow & ERP Governance) and the active studio table.

Studio Tab Configurable Controls, Modals & Governance Switches
1. Lifecycle Stages
(#tab-stages)
Create, reorder (`sort_order`), color-code (`color`), and edit invoice pipeline stages (`#stageModal`). Protected system stages (`Draft`, `Sent`, `Partially Paid`, `Paid`, `Overdue`, `Cancelled`) carry a lock badge so core accounting triggers remain intact while allowing you to insert custom stages (e.g., Awaiting Director Sign-Off or Disputed).
2. Delivery & Couriers
(#tab-delivery)
Configure the dispatch methods available in the Waybill generator (`#deliveryMethodModal`). For each courier or fleet method, define:
  • Method Name & Code (e.g., The Courier Guy / `TCG`).
  • Est. Transit SLA (Business Days): e.g., `2 Days`.
  • Requires Tracking Number (`requires_tracking`): Flags whether dispatchers should supply a waybill reference.
3. Payment Terms
(#tab-terms)
Manage credit terms (`#termModal`) such as Due on Receipt (COD), 14 Days Net, 30 Days Net, or 30 Days EOM. Choose the Calculation Logic (`term_type`):
  • Standard Net Days (Issue Date + X Days)
  • End of Month (EOM) (Last day of Issue Month + X Days)
You can also designate which term is the system-wide Default (`is_default`).
4. Numbering & PDF Templates
(#tab-numbering)
  • Tax Invoice Sequence: Set invoice_prefix (default `INV-`), invoice_next_number, and invoice_number_padding (e.g., 4 digits = `0001`).
  • Delivery Note Sequence: Set delivery_note_prefix (default `DN-`) and delivery_note_next_number.
  • PDF Branding & Defaults: Choose the PDF Accent Theme Color (`Emerald`, `Royal Blue`, `Slate`, `Indigo`, `Crimson`), Default Treasury Bank Account (`default_bank_account_id`), Default Tax Invoice Terms & Conditions, Default Client Footer Note, and Delivery Note (POD) Legal Disclaimer.
5. Workflow & ERP Governance
(#tab-automation)
Contains 6 enterprise governance switches:
  1. Auto-Generate Delivery Note on Invoice Creation (auto_create_delivery_note): Default-checks the Waybill generator on new invoices.
  2. Allow Partial Deliveries / Split Waybills (enable_partial_delivery): Allows multiple Delivery Notes per invoice with custom dispatch quantities.
  3. Include Recipient Signature Block on Delivery Note PDF (require_pod_signature): Prints a formal sign-off box (Received By, ID Number, Signature, Date & Time) on every Waybill PDF.
  4. Print Allocated Serial Numbers on Delivery Notes (show_serials_on_delivery_note): Prints `S/N:` numbers on the Waybill so security guards and clients can verify exact hardware units on arrival.
  5. Require Customer PO Number on Invoices (require_customer_po): Prevents staff from saving an invoice without entering the client's Purchase Order reference.
  6. Automated Overdue Dunning Reminders (auto_send_overdue_reminders): Flags overdue accounts for automated collection follow-ups.
Was this technical guide helpful?
Back to top