hledger-lib-0.26: Core data types, parsers and utilities for the hledger accounting tool.

Safe HaskellNone
LanguageHaskell2010

Hledger.Reports.TransactionsReports

Description

Here are several variants of a transactions report. Transactions reports are like a postings report, but more transaction-oriented, and (in the account-centric variant) relative to a some base account. They are used by hledger-web.

Synopsis

Documentation

type TransactionsReport = (String, [TransactionsReportItem]) Source

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.

triOrigTransaction :: (t, t1, t2, t3, t4, t5) -> t Source

triDate :: (t, Transaction, t1, t2, t3, t4) -> Day Source

triAmount :: (t, t1, t2, t3, t4, t5) -> t4 Source

triBalance :: (t, t1, t2, t3, t4, t5) -> t5 Source

journalTransactionsReport :: ReportOpts -> Journal -> Query -> TransactionsReport Source

Select transactions from the whole journal. This is similar to a "postingsReport" except with transaction-based report items which are ordered most recent first. XXX Or an EntriesReport - use that instead ? This is used by hledger-web's journal view.

accountTransactionsReport :: ReportOpts -> Journal -> Query -> Query -> AccountTransactionsReport Source

transactionsReportByCommodity :: TransactionsReport -> [(Commodity, TransactionsReport)] Source

Split a transactions report whose items may involve several commodities, into one or more single-commodity transactions reports.