1. Overview
The Sales module supports a lean commercial flow: sales order → sales invoice → Finance accounts receivable. Customers and cash collections are managed in Finance; Sales focuses on orders and invoices.
| Area | Capability |
|---|---|
| Orders | Draft, confirm, convert to invoice, cancel |
| Invoices | Create standalone or from order; post/unpost to Finance |
| Customers | Finance partner sub-ledgers (Customer type) |
| Collections | Finance receipt / payment vouchers with allocations |
Not in this module today: stock delivery, quotations, price lists, sales returns as Sales documents, or automatic Inventory movements. Deliveries/quotations mentioned in some localization keys are not implemented as Sales screens.
2. Getting started
2.1 Prerequisites
- Finance chart of accounts ready (typical defaults used in posting include AR, sales revenue, and output VAT accounts).
- Open fiscal year/periods.
- Currencies configured (UI often defaults to base currency and rate 1).
- Customers created under Finance subsidiary customers.
- Users granted Sales order/invoice permissions (and Finance journal post for posting).
2.2 Main navigation
| Menu | Path | Behavior |
|---|---|---|
| Overview | /sales/overview |
Dashboard-style overview (prototype metrics) |
| Customers | /sales/customers |
Redirects to Finance subsidiary customers |
| Sales invoices | /sales/invoices |
Live invoice list and actions |
| Collections | /sales/collections |
Redirects to Finance payment vouchers |
| Sales orders | /sales/orders |
Live order list and actions |
3. Customers
Customers are not owned by Sales. They are Finance partner sub-ledgers with partner type Customer.
| Field (Finance) | Use in Sales |
|---|---|
| Code / name | Shown in order and invoice partner pickers |
| Contact info | Master data in Finance |
| GL account | Optional AR control account override when posting |
| Active | Only active partners should be used |
How to maintain: open Customers from the Sales menu (goes to Finance) or go directly to Finance → Subsidiary ledger — customers.
When creating an order or invoice, select the customer from the partner list filtered to Customer type.
4. Sales orders
4.1 Header fields
| Field | Meaning |
|---|---|
| Order number | Unique per tenant |
| Partner | Customer sub-ledger |
| Order date | Document date |
| Fiscal period | Accounting period |
| Currency / exchange rate | Document currency |
| Status | Lifecycle state |
| Subtotal / tax / total | Amounts |
| Notes | Free text |
| Sales invoice id | Set after conversion |
4.2 Lines
Line number, description, quantity, unit price, line total (quantity × price), optional revenue account.
4.3 Statuses
| Status | Meaning |
|---|---|
| Draft | Editable / deletable |
| Confirmed | Ready to convert to invoice |
| Invoiced | Converted; locked for cancel |
| Cancelled | Abandoned |
4.4 Actions
| Action | From | Rules |
|---|---|---|
| Create | — | Starts as Draft |
| Update / Delete | Draft only | Not after confirm |
| Confirm | Draft | Requires lines and total greater than zero |
| Convert to invoice | Confirmed | Creates Draft invoice; order becomes Invoiced |
| Cancel | Draft or Confirmed | Blocked if Invoiced |
Convert defaults: invoice number often SI-{OrderNumber} if not supplied; invoice date from order date; due date typically order date + 30 days; copies partner, period, currency, rate, notes, lines, and tax.
5. Sales invoices
5.1 Header fields
| Field | Meaning |
|---|---|
| Invoice number | Unique |
| Partner | Customer |
| Sales order | Optional link |
| Invoice date / due date | Billing and payment due |
| Fiscal period / currency / rate | Accounting context |
| Status | Lifecycle |
| Subtotal / tax / total | Amounts |
| Paid amount / open amount | Open = Total − Paid |
| Journal entry | Set after post |
| Notes | Free text |
5.2 Lines
Same shape as order lines. Optional revenue account per line overrides the default sales revenue account when posting.
5.3 Statuses
| Status | Meaning |
|---|---|
| Draft | Editable / deletable / cancellable |
| Posted | Posted to Finance; open AR |
| Partially paid | Some receipts allocated |
| Paid | Fully allocated |
| Cancelled | Abandoned (from Draft) |
5.4 Create paths
- From order — Convert confirmed order.
- Standalone — Create invoice directly (optional order link).
5.5 Actions
| Action | Rules |
|---|---|
| Create / Update / Delete | Draft only for update/delete |
| Post | Draft with total greater than zero → Finance JE + AR open item → Posted |
| Unpost | Reverse Finance posting → Draft; blocked if payments reduced open amount |
| Cancel | Draft only |
5.6 Tax and amounts
Tax amount is maintained on the invoice header. On post, if tax is greater than zero, Finance credits the output VAT account. Total should equal subtotal + tax. Finance validates line sums against subtotal and totals within a small tolerance.
6. Collections
Collections are not entered in Sales. Use Finance receipt / payment vouchers:
- Open Collections from Sales (redirects to Finance payment vouchers) or Finance directly.
- Create a Receipt for the customer and treasury account.
- Allocate to the posted sales invoice open item.
- Sales invoice paid/open amounts and status update automatically via Finance allocation.
Unposting a receipt allocation reverts the invoice payment amounts.
7. Overview screen
/sales/overview provides a sales overview experience for navigation and pipeline-style presentation. Treat operational truth as the live Orders and Invoices lists plus Finance customer/collection screens. Prototype components for customers/collections/invoices exist in the codebase but are not the live routes (customers/collections redirect to Finance; invoices use the real API screen).
8. Permissions summary
Permission group: Sales.
| Permission | Typical use |
|---|---|
| Orders | List and view orders |
| Orders.Create | Create orders |
| Orders.Update | Confirm, cancel, convert to invoice |
| Orders.Delete | Delete draft orders |
| Invoices | List and view invoices |
| Invoices.Create | Create invoices / convert |
| Invoices.Update | Update, unpost, cancel |
| Invoices.Delete | Delete draft invoices |
| Invoices.Post | Post invoice to Finance |
Posting also requires Finance ability to post journal entries. Convert needs both order update and invoice create rights.
9. Integration with Finance
| Event | Finance effect |
|---|---|
| Invoice Post | Debit AR, credit revenue (and output VAT if tax); create customer sub-ledger invoice open item; store journal entry id |
| Invoice Unpost | Reverse posting if no payments applied |
| Receipt allocation | Increases PaidAmount; may set PartiallyPaid / Paid |
| Customer master | Maintained only in Finance |
Default posting accounts are configured in Finance posting services (AR, revenue, output VAT), with optional overrides from partner GL account or invoice line revenue account.
Appendix A — Quick procedures
A.1 Order to cash
- Ensure customer exists in Finance.
- Create sales order → Confirm.
- Convert to invoice.
- Post the invoice.
- Create Finance receipt and allocate to the invoice until Paid.
A.2 Standalone invoice
- Create Draft sales invoice with lines, tax, and totals.
- Post.
- Collect via Finance receipt allocations.
A.3 Correct a posted invoice before payment
- Ensure PaidAmount is still zero.
- Unpost → Draft.
- Edit and post again, or cancel the draft if abandoning.
Appendix B — Operating notes
| Topic | Guidance |
|---|---|
| Inventory | No stock issue/delivery from Sales in the current module |
| Multi-line UI | Current create dialogs may focus on a simple line entry; use API/full form capabilities as exposed in your build |
| Invoice cancel | Available in API for Draft; confirm UI button availability in your build |
| Menu vs route policy | Invoices route requires Sales.Invoices; ensure roles have invoice permissions, not only order permissions |
| Overview | Use for orientation; rely on Orders/Invoices/Finance for transactions |
Appendix C — Document control
| Item | Value |
|---|---|
| Title | Sales Module User Guide |
| Source of truth | modules/sales and frontend/src/app/modules/sales |
| Format | Markdown + Mermaid (PDF edition embeds rendered figures) |
| Screenshots | Not included (by design) |
This guide describes functional capabilities of the Sales module as implemented in the Vertex ERP codebase. UI labels may appear in English or Arabic depending on language settings.