hledger-lib-1.17.1: Core data types, parsers and functionality for the hledger accounting tools

Safe HaskellNone
LanguageHaskell2010

Hledger.Reports.MultiBalanceReport

Description

Multi-column balance reports, used by the balance command.

Synopsis

Documentation

type MultiBalanceReport = PeriodicReport AccountName MixedAmount Source #

A multi balance report is a kind of periodic report, where the amounts correspond to balance changes or ending balances in a given period. It has:

  1. a list of each column's period (date span)
  2. a list of rows, each containing:
  • the full account name
  • the account's depth
  • A list of amounts, one for each column.
  • the total of the row's amounts for a periodic report
  • the average of the row's amounts
  1. the column totals, and the overall grand total (or zero for cumulative/historical reports) and grand average.

multiBalanceReport :: ReportOpts -> Query -> Journal -> MultiBalanceReport Source #

Generate a multicolumn balance report for the matched accounts, showing the change of balance, accumulated balance, or historical balance in each of the specified periods. Does not support tree-mode boring parent eliding. If the normalbalance_ option is set, it adjusts the sorting and sign of amounts (see ReportOpts and CompoundBalanceCommand). hledger's most powerful and useful report, used by the balance command (in multiperiod mode) and (via multiBalanceReport') by the bscfis commands.

multiBalanceReportWith :: ReportOpts -> Query -> Journal -> PriceOracle -> MultiBalanceReport Source #

A helper for multiBalanceReport. This one takes an extra argument, a PriceOracle to be used for looking up market prices. Commands which run multiple reports (bs etc.) can generate the price oracle just once for efficiency, passing it to each report by calling this function directly.

balanceReportFromMultiBalanceReport :: ReportOpts -> Query -> Journal -> BalanceReport Source #

Generates a simple non-columnar BalanceReport, but using multiBalanceReport, in order to support --historical. Does not support tree-mode boring parent eliding. If the normalbalance_ option is set, it adjusts the sorting and sign of amounts (see ReportOpts and CompoundBalanceCommand).