Accounting: AR, AP, payments, journals, and reports
Invoices and bills with status machines, payment matching, balanced journal entries, fiscal periods, and AR aging / P&L / balance sheet reports.
Accounting is the money side: chart of accounts, AR invoices (INV-), AP bills (BILL-), payment matching, journal entries, fiscal periods, and financial reports. It also hosts the 3PL billing rate engine as a shared entry point.
Core workflow in 4 steps#
- Maintain the chart of accounts (acc_accounts) first — every journal line posts against it.
- Create the AR invoice (merchant, issue/due dates, lines; totals auto-sum) or AP bill (vendor, same shape); move draft → sent.
- Record payments against the invoice/bill (amount, date, method, reference); paid/partial/overdue status is derived from what remains.
- Post journal entries (draft → posted): at least two lines, debits must equal credits, and closed fiscal periods block posting.
Reports and 3PL billing#
- Reports: AR aging/collection, profit & loss, balance sheet.
- The /billing section reuses the same wms_* rating tables as the 3PL billing engine (items, rate sheets, rules).