Modern POS Invoice Module
Sales invoices, purchase invoices, AR/AP, returns, credit notes, reporting, and modern document features
Last Updated: June 7, 2026
UI Routes
| Task | Route |
|---|
| Sales invoices (default) | /dashboard/invoices |
| New sales invoice | /dashboard/invoices/new |
| Purchase invoices | /dashboard/invoices/purchase |
| New purchase invoice | /dashboard/invoices/purchase/new |
| Customer advances | /dashboard/invoices/advances |
| AR/AP reports | /dashboard/invoices/reports |
| Recurring templates | /dashboard/invoices/recurring |
Permissions
Sales Invoices
| Permission | Purpose |
|---|
invoices:list | View invoices and returns |
invoices:create | Create draft invoices |
invoices:update | Edit draft invoices |
invoices:approve | Issue draft invoices |
invoices:cancel | Cancel invoices |
invoices:payment | Record receipts, advances, split payments |
invoices:return | Create and approve invoice returns / credit notes |
Purchase Invoices
| Permission | Purpose |
|---|
purchaseInvoices:list | View purchase invoices and supplier returns |
purchaseInvoices:create | Create draft purchase invoices |
purchaseInvoices:update | Edit draft purchase invoices |
purchaseInvoices:approve | Receive purchase invoices (inventory + AP) |
purchaseInvoices:cancel | Cancel purchase invoices |
purchaseInvoices:payment | Record supplier payments |
purchaseInvoices:return | Create and approve supplier returns / credit notes |
Recurring Invoices
| Permission | Purpose |
|---|
recurringInvoices:list | View recurring templates |
recurringInvoices:create | Create templates |
recurringInvoices:update | Update templates and run due generation |
recurringInvoices:delete | Delete templates |
API Endpoints
Sales Invoices — /api/v1/invoices
- Full CRUD, payments, split payments, advances, returns, QR verify, PDF/email receipts
Purchase Invoices — /api/v1/purchase-invoices
- Full CRUD, receive, payments, returns, QR verify
Recurring — /api/v1/recurring-invoices
- Template CRUD and
POST /run-due scheduler endpoint
Reports
| Method | Path | Description |
|---|
| GET | /api/v1/reports/invoices/overview | Sales invoice KPIs |
| GET | /api/v1/reports/invoices/ar-aging | AR aging buckets |
| GET | /api/v1/reports/purchase-invoices/overview | Purchase invoice KPIs |
| GET | /api/v1/reports/purchase-invoices/ap-aging | AP aging buckets |
| GET | /api/v1/reports/invoices/profit | Gross profit by product |
Features Implemented
- Sales invoices: customer snapshot, shipping, terms, multi-currency fields, QR payload, WhatsApp share link, card/cheque payments, split payments, credit notes on returns
- Purchase invoices: supplier snapshot, AP balance tracking, inventory increase + weighted average cost on receive, supplier payments, supplier returns with credit notes
- Accounting: AR/Revenue/VAT on sales issue; Inventory/Input VAT/AP on purchase receive; payment and return reversals
- Reports: AR aging (current, 1-30, 31-60, 61-90, 90+), AP aging (current, 30, 60, 90, 120+), profit by product
- Modern: QR verification, recurring invoice templates, electronic signature on purchase receive, branch-prefixed numbering
Business Rules
Sales invoice
- Draft does not affect inventory or accounting
- Issue decrements stock, posts AR/Revenue/VAT, generates QR payload
- Split payments create multiple receipt records in one transaction
Purchase invoice
- Draft does not affect inventory or supplier balance
- Receive increases stock, updates product average cost, posts Inventory/Input VAT/AP, updates supplier
currentBalance
- Supplier payment reduces AP balance and posts Cash/AP entries
Returns
- Customer returns generate credit note numbers and restock good items only
- Supplier returns decrement restockable items and reduce AP balance