hledger-lib-1.50.3: A library providing the core functionality of hledger

Safe Haskell | None
Language | GHC2021

Hledger.Reports.PostingsReport

Contents

- Tests
- Orphan instances

Description

Postings report, used by the register command.

Synopsis

- type PostingsReport = [PostingsReportItem]
- type PostingsReportItem = (Maybe Day, Maybe Period, Maybe Text, Posting, MixedAmount)
- postingsReport :: ReportSpec -> Journal -> PostingsReport
- mkpostingsReportItem :: Bool -> Bool -> WhichDate -> Maybe Period -> Posting -> MixedAmount -> PostingsReportItem
- type SortSpec = [SortField]
- defsortspec :: SortSpec
- tests_PostingsReport :: TestTree

# Documentation

type PostingsReport = [PostingsReportItem] Source #

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

type PostingsReportItem = (Maybe Day, Maybe Period, Maybe Text, Posting, MixedAmount) Source #

postingsReport :: ReportSpec -> Journal -> PostingsReport Source #

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 Period -> Posting -> MixedAmount -> PostingsReportItem Source #

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

type SortSpec = [SortField] Source #

defsortspec :: SortSpec Source #

# Tests

tests_PostingsReport :: TestTree Source #

# Orphan instances

HasAmounts PostingsReportItem Source # |
Instance details Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem Source #