Skip to content

Expenses Phase A In-progress

Expenses is the merchant's books. It tracks where money lives (cash drawers, bank, QR, mobile-POS accounts), records every money movement as a balanced double-entry voucher, and classifies income and expense by category — most of it posted automatically when a sale is paid, a purchase order is received, or stock moves.

1. Identity

PropertyValue
Module IDCORE-12
TierCore
StatusIn-progress
PhaseP1 (auto-posting) shipped · P2 (manual vouchers, accounts UI, transfers) emerging
PriorityMEDIUM
Primary usersOwner · Accountant · Manager

2. Purpose & Scope

IncludedExcluded
Money accounts / wallets (Cash, Bank, QR, Mobile-POS)Payment gateway processing (Payment module)
Double-entry vouchers (receipt, payment, transfer, adjustment)Tax invoice issuance (Invoice module)
Income / expense category hierarchyStock quantity & costing math (Inventory module)
Automatic posting from sales, purchases, stock movementsBudgeting, P&L statements, cash-flow forecasting (future)
Voucher void by balanced reversalRecurring / scheduled expenses (future)
Per-merchant account isolationReceipt-image capture / OCR (future)

3. Capabilities

CapabilityWhat the user can doStatus
Money accountsHold balances across cash drawers, bank, QR, and mobile-POS accounts; one default account per typeIn-progress
Auto income on sale paidSale revenue books a receipt voucher automatically, no manual entryBuilt
Auto purchase postingReceiving a purchase order books a payment voucher to the vendor automaticallyBuilt
Auto stock postingCost of goods sold and stock adjustments post to internal control accounts automaticallyBuilt
CategoriesClassify money movements with 14 seeded categories plus custom merchant categoriesBuilt
Manual vouchersDraft, approve, issue, and void vouchers by handIn-progress
Account transfersMove money between accounts as a balanced transfer voucherIn-progress
Shift cash movementsRecord pay-ins, pay-outs, and safe drops against a POS sessionPlanned

4. Module Dependencies

Depends onWhy
PaymentA successful payment triggers an automatic receipt voucher for the sale
InventoryReceiving a purchase order, selling stock, and stock adjustments trigger automatic vouchers
Commerce (Merchant)A new merchant gets its default accounts reconciled automatically
ReportsConsumes finance data for financial analytics

5. Backend Packages

Implementation detail lives in the developer docs — this section only maps the module to the service that powers it.

PackageRoleDeveloper docs
@nx/financeDouble-entry bookkeeping engine: accounts, vouchers, ledger lines, categories, event-driven postingfinance

6. Key User Flows

Automatic receipt on a paid sale

Manual transfer between accounts

7. Roles & Permissions

RoleCanCannot
OwnerView and manage own merchants' accounts, vouchers, and categoriesSee other organizers' merchants
Accountant / ManagerRecord vouchers, transfers, and classify movements within their merchantManage payment-gateway credentials
Super Admin / AdminSee accounts across all merchants

Account visibility is merchant-scoped: non-admins only see accounts of merchants they are granted. See the finance integration notes for the authorization contract.

8. Status & Roadmap

PhaseCapabilities
P1Automatic posting from sale payments, purchase-order receipts, and stock movements; 14 seeded categories; default-account reconciliation on new merchant
P2Account management UI, manual draft→issue voucher lifecycle, account transfers, custom categories
P3Shift cash movements (pay-in / pay-out / safe drop), budgeting, P&L, cash-flow forecasting

Status honesty: auto-posting (P1) is live and verified in code. The manual account/voucher UI and transfers (P2) are partially wired — the posting engine supports them, but merchant-facing screens and some safeguards are still maturing (see Test Cases for verified vs gap items).

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.