HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehledger-lib-1.52.4GHC2021

Hledger.Reports.BalanceReport

Balance report, used by the balance command.

  • 2 types
  • 3 values
  • Packagehledger-lib-1.52.4
  • Exports5
  • LanguageGHC2021
  • LicenceGPL-3.0-or-later
  • SourceBalanceReport.hs

A simple balance report. It has:

  1. a list of items, one per account, each containing:

  • the full account name

  • the Ledger-style elided short account name (the leaf account name, prefixed by any boring parents immediately above); or with --flat, the full account name again

  • the number of indentation steps for rendering a Ledger-style account tree, taking into account elided boring parents, --no-elide and --flat

  • an amount

  1. the total of all amounts

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. If the normalbalance_ option is set, it adjusts the sorting and sign of amounts (see ReportOpts and CompoundBalanceCommand).

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.

Tests

1 declaration

Orphan instances

1 instance