Sales Invoices
Issue customer invoices, manage payment terms, record tax, and post directly to Accounts Receivable.
Routes:
/sales-invoices /sales-invoices/:id Sales Invoices
The Sales Invoices module handles customer billing. Generating and posting an invoice records tax liabilities, posts Accounts Receivable to the General Ledger, and updates order completion states.
Invoicing Rules & Accounting Integration
1. Generating Invoices from Orders
- Invoices can be generated directly from confirmed or shipped Sales Orders.
- Partial Invoicing: If an order is delivered in stages, multiple partial invoices can be raised against individual shipments.
- Auto-Completion: When 100% of an order’s line items have been billed across invoices, the Sales Order automatically transitions to
invoiced.
2. General Ledger Posting
Posting a sales invoice creates an automatic balanced journal entry in the General Ledger:
- Debit: Accounts Receivable (Customer balance increases)
- Credit: Sales Revenue (Product income accounts)
- Credit: Tax / GST Payable (Tax output liability)
3. Tax Compliance & Immutability Guarantees
- No Hard Deletions: Invoices, credit notes, and invoice line items are protected by PostgreSQL database triggers (
herobm_core.prevent_financial_deletion). Once created, they cannot be deleted or truncated. - Compensating Corrections: Errors or cancellations must be handled via Cancellation (which posts an automatic reversing journal entry) or by issuing a Sales Credit Note.
- Continuous Sequence Monitoring: Invoices follow chronological sequential numbering. An automated background verification engine runs scheduled audits to guarantee gapless continuity and timestamp monotonicity.
Step-by-Step Workflows
1. Generating a Sales Invoice
- Go to Sales → Sales Invoices (
/sales-invoices). - Click New Invoice.
- Select the Sales Order from the search list.
- Review the billed quantities, unit prices, discounts, and tax rates.
- Verify the Invoice Date and calculated Due Date.
- Click Post Invoice to finalize the billing and update the General Ledger.
- Click PDF or Email to send the official tax invoice to the customer.
Field Reference
| Field | Description |
|---|---|
| Invoice Number | Legal tax invoice identifier. |
| Customer | Billed customer account. |
| Sales Order | Originating sales order reference. |
| Invoice Date | Official billing date. |
| Due Date | Payment settlement deadline based on terms. |
| Subtotal | Net amount before tax. |
| Tax Amount | Calculated GST / VAT. |
| Total Amount | Gross payable amount in customer currency. |
Field Reference & Data Dictionary
Key database fields, input parameters, and definitions associated with this workflow screen:
| Field / Parameter | Display Name | Description & Rules |
|---|---|---|
| invoice_number | Invoice Number | Sequential tax invoice number (e.g. INV-2026-00312). |
| customer_id | Customer | Customer account billed for goods or services. |
| sales_order_id | Sales Order | Originating sales order linked to this invoice. |
| invoice_date | Invoice Date | Date of issue for tax and reporting purposes. |
| due_date | Due Date | Payment due date calculated from customer trading terms. |
| currency_code | Currency | Invoice currency, matching the sales order. |
| total_amount | Invoice Total | Grand total including line amounts and tax. |