hledger-0.6.1: A command-line (or curses or web-based) double-entry accounting tool.Source codeContentsIndex
Ledger.RawLedger
Description
A RawLedger is a parsed ledger file. We call it raw to distinguish from the cached Ledger.
Synopsis
rawLedgerEmpty :: RawLedger
addLedgerTransaction :: LedgerTransaction -> RawLedger -> RawLedger
addModifierTransaction :: ModifierTransaction -> RawLedger -> RawLedger
addPeriodicTransaction :: PeriodicTransaction -> RawLedger -> RawLedger
addHistoricalPrice :: HistoricalPrice -> RawLedger -> RawLedger
addTimeLogEntry :: TimeLogEntry -> RawLedger -> RawLedger
rawLedgerTransactions :: RawLedger -> [Transaction]
rawLedgerAccountNamesUsed :: RawLedger -> [AccountName]
rawLedgerAccountNames :: RawLedger -> [AccountName]
rawLedgerAccountNameTree :: RawLedger -> Tree AccountName
filterRawLedger :: DateSpan -> [String] -> Maybe Bool -> Bool -> RawLedger -> RawLedger
filterRawLedgerTransactionsByDescription :: [String] -> RawLedger -> RawLedger
filterRawLedgerTransactionsByDate :: DateSpan -> RawLedger -> RawLedger
filterRawLedgerTransactionsByClearedStatus :: Maybe Bool -> RawLedger -> RawLedger
filterRawLedgerPostingsByRealness :: Bool -> RawLedger -> RawLedger
filterRawLedgerPostingsByDepth :: Int -> RawLedger -> RawLedger
filterRawLedgerTransactionsByAccount :: [String] -> RawLedger -> RawLedger
canonicaliseAmounts :: Bool -> RawLedger -> RawLedger
rawLedgerAmounts :: RawLedger -> [MixedAmount]
rawLedgerCommodities :: RawLedger -> [Commodity]
rawLedgerPrecisions :: RawLedger -> [Int]
rawLedgerConvertTimeLog :: LocalTime -> RawLedger -> RawLedger
rawLedgerDateSpan :: RawLedger -> DateSpan
matchpats :: [String] -> String -> Bool
Documentation
rawLedgerEmpty :: RawLedgerSource
addLedgerTransaction :: LedgerTransaction -> RawLedger -> RawLedgerSource
addModifierTransaction :: ModifierTransaction -> RawLedger -> RawLedgerSource
addPeriodicTransaction :: PeriodicTransaction -> RawLedger -> RawLedgerSource
addHistoricalPrice :: HistoricalPrice -> RawLedger -> RawLedgerSource
addTimeLogEntry :: TimeLogEntry -> RawLedger -> RawLedgerSource
rawLedgerTransactions :: RawLedger -> [Transaction]Source
rawLedgerAccountNamesUsed :: RawLedger -> [AccountName]Source
rawLedgerAccountNames :: RawLedger -> [AccountName]Source
rawLedgerAccountNameTree :: RawLedger -> Tree AccountNameSource
filterRawLedger :: DateSpan -> [String] -> Maybe Bool -> Bool -> RawLedger -> RawLedgerSource
Remove ledger transactions we are not interested in. Keep only those which fall between the begin and end dates, and match the description pattern, and are cleared or real if those options are active.
filterRawLedgerTransactionsByDescription :: [String] -> RawLedger -> RawLedgerSource
Keep only ledger transactions whose description matches the description patterns.
filterRawLedgerTransactionsByDate :: DateSpan -> RawLedger -> RawLedgerSource
Keep only ledger transactions which fall between begin and end dates. We include transactions on the begin date and exclude transactions on the end date, like ledger. An empty date string means no restriction.
filterRawLedgerTransactionsByClearedStatus :: Maybe Bool -> RawLedger -> RawLedgerSource
Keep only ledger transactions which have the requested cleared/uncleared status, if there is one.
filterRawLedgerPostingsByRealness :: Bool -> RawLedger -> RawLedgerSource
Strip out any virtual postings, if the flag is true, otherwise do no filtering.
filterRawLedgerPostingsByDepth :: Int -> RawLedger -> RawLedgerSource
Strip out any postings to accounts deeper than the specified depth (and any ledger transactions which have no postings as a result).
filterRawLedgerTransactionsByAccount :: [String] -> RawLedger -> RawLedgerSource
Keep only ledger transactions which affect accounts matched by the account patterns.
canonicaliseAmounts :: Bool -> RawLedger -> RawLedgerSource
Give all a ledger's amounts their canonical display settings. That is, in each commodity, amounts will use the display settings of the first amount detected, and the greatest precision of the amounts detected. Also, amounts are converted to cost basis if that flag is active.
rawLedgerAmounts :: RawLedger -> [MixedAmount]Source
Get just the amounts from a ledger, in the order parsed.
rawLedgerCommodities :: RawLedger -> [Commodity]Source
Get just the ammount commodities from a ledger, in the order parsed.
rawLedgerPrecisions :: RawLedger -> [Int]Source
Get just the amount precisions from a ledger, in the order parsed.
rawLedgerConvertTimeLog :: LocalTime -> RawLedger -> RawLedgerSource
Close any open timelog sessions using the provided current time.
rawLedgerDateSpan :: RawLedger -> DateSpanSource
The (fully specified) date span containing all the raw ledger's transactions, or DateSpan Nothing Nothing if there are none.
matchpats :: [String] -> String -> BoolSource
Check if a set of ledger account/description patterns matches the given account name or entry description. Patterns are case-insensitive regular expression strings; those beginning with - are anti-patterns.
Produced by Haddock version 2.6.0