Whole-journal, account-centric, and per-commodity transactions reports, used by hledger-web.
- type TransactionsReport = (String, [TransactionsReportItem])
- type TransactionsReportItem = (Transaction, Transaction, Bool, String, MixedAmount, MixedAmount)
- triDate :: (Transaction, t, t1, t2, t3, t4) -> Day
- triBalance :: (t, t1, t2, t3, t4, t5) -> t5
- triSimpleBalance :: (t, t1, t2, t3, t4, MixedAmount) -> [Char]
- journalTransactionsReport :: ReportOpts -> Journal -> Query -> TransactionsReport
- accountTransactionsReport :: ReportOpts -> Journal -> Query -> Query -> TransactionsReport
- transactionsReportByCommodity :: TransactionsReport -> [TransactionsReport]
A transactions report includes a list of transactions (posting-filtered and unfiltered variants), a running balance, and some other information helpful for rendering a register view (a flag indicating multiple other accounts and a display string describing them) with or without a notion of current account(s). Two kinds of report use this data structure, see journalTransactionsReport and accountTransactionsReport below for detais.
Select transactions from the whole journal. This is similar to a postingsReport except with transaction-based report items which are ordered most recent first. This is used by eg hledger-web's journal view.
Select transactions within one or more current accounts, and make a transactions report relative to those account(s). This means:
- it shows transactions from the point of view of the current account(s). The transaction amount is the amount posted to the current account(s). The other accounts' names are provided.
- With no transaction filtering in effect other than a start date, it shows the accurate historical running balance for the current account(s). Otherwise it shows a running total starting at 0.
This is used by eg hledger-web's account register view. Currently, reporting intervals are not supported, and report items are most recent first.