hledger-1.5: Command-line interface for the hledger accounting tool

Safe HaskellNone



A ledger-compatible register command.



register :: CliOpts -> Journal -> IO () Source #

Print a (posting) register report.

postingsReportAsText :: CliOpts -> PostingsReport -> String Source #

Render a register report as plain text suitable for console output.

postingsReportItemAsText :: CliOpts -> Int -> Int -> PostingsReportItem -> String Source #

Render one register report line item as plain text. Layout is like so: width (specified, terminal width, or 80) -------------------- date (10) description account amount (12) balance (12) DDDDDDDDDD dddddddddddddddddddd aaaaaaaaaaaaaaaaaaa AAAAAAAAAAAA AAAAAAAAAAAA If description's width is specified, account will use the remaining space. Otherwise, description and account divide up the space equally.

With a report interval, the layout is like so: width (specified, terminal width, or 80) -------------------- date (21) account amount (12) balance (12) DDDDDDDDDDDDDDDDDDDDD aaaaaaaaaaaaaaaaaaaaaaaaaaaaa AAAAAAAAAAAA AAAAAAAAAAAA

date and description are shown for the first posting of a transaction only.

Returns a string which can be multi-line, eg if the running balance has multiple commodities. Does not yet support formatting control like balance reports.