 | hledger-lib-0.14: Reusable types and utilities for the hledger accounting tool and financial apps in general. | Source code | Contents | Index |
|
|
|
Description |
A Journal is a set of Transactions and related data, usually parsed
from a hledger/ledger journal file or timelog. This is the primary hledger
data object.
|
|
Synopsis |
|
|
|
Documentation |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
Convert a list of postings to a map from account name to that
account's postings.
|
|
Produced by Haddock version 2.6.1 |