hledger-lib-1.19.1: A reusable library providing the core functionality of hledger

Safe Haskell | None
Language | Haskell2010

Hledger.Reports.TransactionsReport

Description

A transactions report. Like an EntriesReport, but with more information such as a running balance.

Synopsis

- type TransactionsReport = (String, [TransactionsReportItem])
- type TransactionsReportItem = (Transaction, Transaction, Bool, String, MixedAmount, MixedAmount)
- transactionsReport :: ReportOpts -> Journal -> Query -> TransactionsReport
- transactionsReportByCommodity :: TransactionsReport -> [(CommoditySymbol, TransactionsReport)]
- triOrigTransaction :: (a, b, c, d, e, f) -> a
- triDate :: (a, Transaction, c, d, e, f) -> Day
- triAmount :: (a, b, c, d, e, f) -> e
- triBalance :: (a, b, c, d, e, f) -> f
- triCommodityAmount :: CommoditySymbol -> (a, b, c, d, MixedAmount, f) -> MixedAmount
- triCommodityBalance :: CommoditySymbol -> (a, b, c, d, e, MixedAmount) -> MixedAmount
- tests_TransactionsReport :: TestTree

# Documentation

type TransactionsReport = (String, [TransactionsReportItem]) Source #

A transactions report includes a list of transactions touching multiple accounts (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 transactionsReport and accountTransactionsReport below for details.

type TransactionsReportItem = (Transaction, Transaction, Bool, String, MixedAmount, MixedAmount) Source #

transactionsReport :: 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.

transactionsReportByCommodity :: TransactionsReport -> [(CommoditySymbol, TransactionsReport)] Source #

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

triOrigTransaction :: (a, b, c, d, e, f) -> a Source #

triDate :: (a, Transaction, c, d, e, f) -> Day Source #

triAmount :: (a, b, c, d, e, f) -> e Source #

triBalance :: (a, b, c, d, e, f) -> f Source #

triCommodityAmount :: CommoditySymbol -> (a, b, c, d, MixedAmount, f) -> MixedAmount Source #

triCommodityBalance :: CommoditySymbol -> (a, b, c, d, e, MixedAmount) -> MixedAmount Source #

tests_TransactionsReport :: TestTree Source #