Context
The Trial Balance report already groups accounts into Balance Sheet (Asset + Liability + Equity) and Profit & Loss (Revenue + Expense) blocks with subtotals — so the data is there. What's missing is a "give me the report in the shape an accountant expects to read it" view: a dedicated Balance Sheet and Profit & Loss sub-mode under Reports.
These aren't new queries — they're reshapings of get_trial_balance() output:
- Balance Sheet = Assets (DR-natural) + Liabilities (CR-natural) + Equity (CR-natural). Two-column form: Assets on the left, Liabilities + Equity on the right, each side summing to the same total. As-of date filter (already in trial balance).
- Profit & Loss = Revenue (CR-natural) − Expense (DR-natural) = Net Income. Top section revenue, bottom section expenses, then net at the bottom. Date range filter (
from / to), unlike trial balance which is point-in-time.
Why it earns its keep
Visual / cognitive — a forum admin sees "Balance Sheet" and "P&L" and recognises them; "Trial Balance" they have to reverse-engineer. Same data, more legible framing.
Implementation shape
- Two new Reports sub-modes:
balance_sheet, profit_loss.
- Two new controller methods that call
get_trial_balance() (existing) + reshape.
- Two new template files (or branches in
acp_bbaccounts_reports.html).
- Both ACP and FE Reports get them (FE =
main_controller, mirror).
- For the FE, gated by the same
u_accounts_view permission that already gates the rest of the FE Reports — no new perm.
Out of scope (separate epic)
- Cash flow statement — needs additional metadata bbAccounts doesn't currently track (operating vs investing vs financing classification per entry/account). Skip for now.
Depends on
Nothing. Could ship before #7 (period locking) and avatharbe/bbAccounts-dev#88 (close) since it only consumes existing service surface.
Acceptance
Context
The Trial Balance report already groups accounts into Balance Sheet (Asset + Liability + Equity) and Profit & Loss (Revenue + Expense) blocks with subtotals — so the data is there. What's missing is a "give me the report in the shape an accountant expects to read it" view: a dedicated Balance Sheet and Profit & Loss sub-mode under Reports.
These aren't new queries — they're reshapings of
get_trial_balance()output:from/to), unlike trial balance which is point-in-time.Why it earns its keep
Visual / cognitive — a forum admin sees "Balance Sheet" and "P&L" and recognises them; "Trial Balance" they have to reverse-engineer. Same data, more legible framing.
Implementation shape
balance_sheet,profit_loss.get_trial_balance()(existing) + reshape.acp_bbaccounts_reports.html).main_controller, mirror).u_accounts_viewpermission that already gates the rest of the FE Reports — no new perm.Out of scope (separate epic)
Depends on
Nothing. Could ship before #7 (period locking) and avatharbe/bbAccounts-dev#88 (close) since it only consumes existing service surface.
Acceptance
balance_sheet,profit_loss.