Skip to content

Epic: materialised P&L and Balance Sheet report shapes #9

@avandenberghe

Description

@avandenberghe

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

  • Two new Reports sub-modes: balance_sheet, profit_loss.
  • Balance Sheet shows Assets vs (Liabilities + Equity) with point-in-time date.
  • P&L shows Revenue − Expenses → Net Income with date-range filter.
  • Both surfaces in ACP and FE.
  • Multi-pool aware: one BS / P&L per currency pool, like trial balance does today.
  • No new ledger service methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions