Balance report, used by the balance command.
- type BalanceReport = ([BalanceReportItem], MixedAmount)
- type BalanceReportItem = (RenderableAccountName, MixedAmount)
- type RenderableAccountName = (AccountName, AccountName, Int)
- balanceReport :: ReportOpts -> Query -> Journal -> BalanceReport
- flatShowsExclusiveBalance :: Bool
- tests_Hledger_Reports_BalanceReport :: Test
A simple single-column balance report. It has:
- a list of rows, each containing a renderable account name and a corresponding amount
- the final total of the amounts
A renderable account name includes some additional hints for rendering accounts in a balance report. It has:
- The full account name
- The ledger-style short elided account name (the leaf name, prefixed by any boring parents immediately above)
- The number of indentation steps to use when rendering a ledger-style account tree (normally the 0-based depth of this account excluding boring parents, or 0 with --flat).
Enabling this makes balance --flat --empty also show parent accounts without postings, in addition to those with postings and a zero balance. Disabling it shows only the latter. No longer supported, but leave this here for a bit. flatShowsPostinglessAccounts = True
Generate a simple balance report, containing the matched accounts and their balances (change of balance) during the specified period. This is like periodBalanceReport with a single column (but more mature, eg this can do hierarchical display).
When true (the default), this makes balance --flat reports and their implementation clearer. Single/multi-col balance reports currently aren't all correct if this is false.