Finance & Accounting
The iCommerce engine carries a full double-entry finance layer alongside its commerce domains β general ledger, AP, AR, fixed assets, and ASC 606-style revenue recognition β all available over REST, the embedded accessor, both bindings, and as agent tools.All monetary values cross the binding boundary as exact decimal strings (e.g.
"30.01"),
not floats. Do not parse them into a binary float before doing arithmetic.General ledger
FX revaluation
GL auto-posting
Config-gated and off by default. When enabled, posted depreciation periods and recognized revenue generate balanced, posted journal entries β depreciation expense to accumulated depreciation, and deferred revenue to sales revenue.Month-end close orchestration
generalLedger.closeMonth), and the close_month CLI
tool. The admin consoleβs Close page runs a dry-run report first and requires a typed
confirmation for the real close.
Accounts payable
- Bills with AP aging and status filters.
- Payments with allocations, plus payment runs.
- 3-way match β pure tolerance-based PO β receipt β bill matching at
GET /ap/bills/{id}/three-way-match, computed on read.
Accounts receivable
Aging, payment application, credit memos, write-offs, dunning, and statements. Collections activities can be recorded and listed, with a dunning-due queue atGET /ar/dunning/due.
Fixed assets
A full asset register: lifecycledraft β in-service β disposed/written-off, straight-line and
declining-balance depreciation schedules with an exact final-period plug, and disposal
gain/loss. Available on SQLite and PostgreSQL with embedded accessors.
Revenue recognition
ASC 606-style: contracts, performance obligations with allocation validation, and ratable, point-in-time, or milestone schedules with period recognition.Cycle counts
Full workflowdraft β in-progress β completed, with transactional variance application to
location inventory and cycle_count movement audit records.
Domain events
Ten finance events are webhook-subscribable:- Fixed asset placed in service, disposed, written off
- Depreciation posted
- Revenue recognized
- Revenue contract completed
- Cycle count completed
- 3-way-match variance detected
- FX revaluation posted
- Month-end close completed
Purchase-order state machine
PurchaseOrderStatus::can_transition_to plus validate() are enforced in the store β illegal
transitions now return validation errors rather than silently applying.
Terminal-state guards also apply to transfer-order and inbound-shipment cancellation on both
backends: received or already-cancelled documents can no longer be cancelled.
Coverage
Roughly 140 REST endpoints cover this surface, all documented in OpenAPI with tags and validated by the spec test suite:
Carts/checkout (10 endpoints) and backorders (5) round out the commerce side.
Related
- API Hardening β auth, idempotency, pagination
- Backup & Restore
- Bindings