- nulljournal :: Journal
- nullctx :: JournalContext
- journalFilePath :: Journal -> FilePath
- journalFilePaths :: Journal -> [FilePath]
- mainfile :: Journal -> (FilePath, String)
- addTransaction :: Transaction -> Journal -> Journal
- addModifierTransaction :: ModifierTransaction -> Journal -> Journal
- addPeriodicTransaction :: PeriodicTransaction -> Journal -> Journal
- addHistoricalPrice :: HistoricalPrice -> Journal -> Journal
- addTimeLogEntry :: TimeLogEntry -> Journal -> Journal
- journalPostings :: Journal -> [Posting]
- journalAccountNamesUsed :: Journal -> [AccountName]
- journalAccountNames :: Journal -> [AccountName]
- journalAccountNameTree :: Journal -> Tree AccountName
- filterJournalTransactions :: FilterSpec -> Journal -> Journal
- filterJournalPostings :: FilterSpec -> Journal -> Journal
- filterJournalTransactionsByDescription :: [String] -> Journal -> Journal
- filterJournalTransactionsByDate :: DateSpan -> Journal -> Journal
- filterJournalTransactionsByClearedStatus :: Maybe Bool -> Journal -> Journal
- filterJournalPostingsByClearedStatus :: Maybe Bool -> Journal -> Journal
- filterJournalPostingsByRealness :: Bool -> Journal -> Journal
- filterJournalPostingsByEmpty :: Bool -> Journal -> Journal
- filterJournalTransactionsByDepth :: Maybe Int -> Journal -> Journal
- filterJournalPostingsByDepth :: Maybe Int -> Journal -> Journal
- filterJournalTransactionsByAccount :: [String] -> Journal -> Journal
- filterJournalPostingsByAccount :: [String] -> Journal -> Journal
- journalSelectingDate :: WhichDate -> Journal -> Journal
- journalFinalise :: ClockTime -> LocalTime -> FilePath -> String -> JournalContext -> Journal -> Either String Journal
- journalBalanceTransactions :: Journal -> Either String Journal
- journalCanonicaliseAmounts :: Journal -> Journal
- journalApplyHistoricalPrices :: Journal -> Journal
- journalHistoricalPriceFor :: Journal -> Day -> Commodity -> Maybe MixedAmount
- journalCloseTimeLogEntries :: LocalTime -> Journal -> Journal
- journalConvertAmountsToCost :: Journal -> Journal
- journalCanonicalCommodities :: Journal -> Map String Commodity
- journalAmountCommodities :: Journal -> [Commodity]
- journalAmountAndPriceCommodities :: Journal -> [Commodity]
- amountCommodities :: Amount -> [Commodity]
- journalAmounts :: Journal -> [MixedAmount]
- journalDateSpan :: Journal -> DateSpan
- matchpats :: [String] -> String -> Bool
- journalAccountInfo :: Journal -> (Tree AccountName, Map AccountName Account)
- groupPostings :: [Posting] -> (Tree AccountName, AccountName -> [Posting], AccountName -> MixedAmount, AccountName -> MixedAmount)
- calculateBalances :: Tree AccountName -> (AccountName -> [Posting]) -> Tree (AccountName, (MixedAmount, MixedAmount))
- postingsByAccount :: [Posting] -> Map AccountName [Posting]
Keep only transactions we are interested in, as described by the filter specification. May also massage the data a little.
Keep only postings we are interested in, as described by the filter specification. May also massage the data a little. This can leave unbalanced transactions.
Keep only transactions whose description matches the description patterns.
Keep only 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.
Keep only transactions which have the requested cleared/uncleared status, if there is one.
Keep only postings which have the requested cleared/uncleared status, if there is one.
Strip out any virtual postings, if the flag is true, otherwise do no filtering.
Strip out any postings with zero amount, unless the flag is true.
Keep only transactions which affect accounts deeper than the specified depth.
Strip out any postings to accounts deeper than the specified depth (and any transactions which have no postings as a result).
Keep only transactions which affect accounts matched by the account patterns. More precisely: each positive account pattern excludes transactions which do not contain a posting to a matched account, and each negative account pattern excludes transactions containing a posting to a matched account.
Keep only postings which affect accounts matched by the account patterns. This can leave transactions unbalanced.
Convert this journal's transactions' primary date to either the actual or effective date.
Do post-parse processing on a journal, to make it ready for use.
Fill in any missing amounts and check that all journal transactions balance, or return an error message. This is done after parsing all amounts and working out the canonical commodities, since balancing depends on display precision. Reports only the first error encountered.
Convert all the journal's amounts to their canonical display settings. Ie, all amounts in a given commodity will use (a) the display settings of the first, and (b) the greatest precision, of the amounts in that commodity. Prices are canonicalised as well, so consider calling journalApplyHistoricalPrices before this.
Apply this journal's historical price records to unpriced amounts where possible.
Get the price for a commodity on the specified day from the price database, if known. Does only one lookup step, ie will not look up the price of a price.
Close any open timelog sessions in this journal using the provided current time.
Convert all this journal's amounts to cost by applying their prices, if any.
Get this journal's unique, display-preference-canonicalised commodities, by symbol.
Get all this journal's amounts' commodities, in the order parsed.
Get all this journal's amount and price commodities, in the order parsed.
Get this amount's commodity and any commodities referenced in its price.
Get all this journal's amounts, in the order parsed.
The (fully specified) date span containing this journal's transactions, or DateSpan Nothing Nothing if there are none.
Check if a set of hledger account/description filter patterns matches the given account name or entry description. Patterns are case-insensitive regular expressions. Prefixed with not:, they become anti-patterns.
Calculate the account tree and all account balances from a journal's postings, returning the results for efficient lookup.
Given a list of postings, return an account name tree and three query functions that fetch postings, subaccount-excluding-balance and subaccount-including-balance by account name.
Add subaccount-excluding and subaccount-including balances to a tree of account names somewhat efficiently, given a function that looks up transactions by account name.