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

Safe Haskell | None
Language | Haskell2010

Hledger.Reports.PostingsReport

Contents

- Tests

Description

Postings report, used by the register command.

Synopsis

- type PostingsReport = (String, [PostingsReportItem])
- type PostingsReportItem = (Maybe Day, Maybe Day, Maybe String, Posting, MixedAmount)
- postingsReport :: ReportOpts -> Query -> Journal -> PostingsReport
- mkpostingsReportItem :: Bool -> Bool -> WhichDate -> Maybe Day -> Posting -> MixedAmount -> PostingsReportItem
- tests_Hledger_Reports_PostingsReport :: Test

# Documentation

type PostingsReport = (String, [PostingsReportItem]) #

A postings report is a list of postings with a running total, a label for the total field, and a little extra transaction info to help with rendering. This is used eg for the register command.

type PostingsReportItem = (Maybe Day, Maybe Day, Maybe String, Posting, MixedAmount) #

postingsReport :: ReportOpts -> Query -> Journal -> PostingsReport #

Select postings from the journal and add running balance and other information to make a postings report. Used by eg hledger's register command.

mkpostingsReportItem :: Bool -> Bool -> WhichDate -> Maybe Day -> Posting -> MixedAmount -> PostingsReportItem #

Generate one postings report line item, containing the posting, the current running balance, and optionally the posting date and/or the transaction description.

# Tests

tests_Hledger_Reports_PostingsReport :: Test #