Hledger.Data.Ledger
Description
A Ledger
is derived from a Journal
by applying a filter specification
to select Transaction
s and Posting
s of interest. It contains the
filtered journal and knows the resulting chart of accounts, account
balances, and postings in each account.
- nullledger :: Ledger
- journalToLedger :: FilterSpec -> Journal -> Ledger
- ledgerAccountNames :: Ledger -> [AccountName]
- ledgerAccount :: Ledger -> AccountName -> Account
- ledgerAccounts :: Ledger -> [Account]
- ledgerTopAccounts :: Ledger -> [Account]
- ledgerAccountsMatching :: [String] -> Ledger -> [Account]
- ledgerSubAccounts :: Ledger -> Account -> [Account]
- ledgerPostings :: Ledger -> [Posting]
- ledgerAccountTree :: Int -> Ledger -> Tree Account
- ledgerAccountTreeAt :: Ledger -> Account -> Maybe (Tree Account)
- ledgerDateSpan :: Ledger -> DateSpan
- accountnames :: Ledger -> [AccountName]
- account :: Ledger -> AccountName -> Account
- accounts :: Ledger -> [Account]
- topaccounts :: Ledger -> [Account]
- accountsmatching :: [String] -> Ledger -> [Account]
- subaccounts :: Ledger -> Account -> [Account]
- postings :: Ledger -> [Posting]
- commodities :: Ledger -> Map String Commodity
- accounttree :: Int -> Ledger -> Tree Account
- accounttreeat :: Ledger -> Account -> Maybe (Tree Account)
- rawdatespan :: Ledger -> DateSpan
- ledgeramounts :: Ledger -> [MixedAmount]
Documentation
journalToLedger :: FilterSpec -> Journal -> LedgerSource
Filter a journal's transactions as specified, and then process them to derive a ledger containing all balances, the chart of accounts, canonicalised commodities etc.
ledgerAccountNames :: Ledger -> [AccountName]Source
List a ledger's account names.
ledgerAccount :: Ledger -> AccountName -> AccountSource
Get the named account from a ledger.
ledgerAccounts :: Ledger -> [Account]Source
List a ledger's accounts, in tree order
ledgerTopAccounts :: Ledger -> [Account]Source
List a ledger's top-level accounts, in tree order
ledgerAccountsMatching :: [String] -> Ledger -> [Account]Source
Accounts in ledger whose name matches the pattern, in tree order.
ledgerSubAccounts :: Ledger -> Account -> [Account]Source
List a ledger account's immediate subaccounts
ledgerPostings :: Ledger -> [Posting]Source
List a ledger's postings, in the order parsed.
ledgerAccountTree :: Int -> Ledger -> Tree AccountSource
Get a ledger's tree of accounts to the specified depth.
ledgerAccountTreeAt :: Ledger -> Account -> Maybe (Tree Account)Source
Get a ledger's tree of accounts rooted at the specified account.
ledgerDateSpan :: Ledger -> DateSpanSource
The (fully specified) date span containing all the ledger's (filtered) transactions, or DateSpan Nothing Nothing if there are none.
accountnames :: Ledger -> [AccountName]Source
Convenience aliases.
account :: Ledger -> AccountName -> AccountSource
topaccounts :: Ledger -> [Account]Source
accountsmatching :: [String] -> Ledger -> [Account]Source
subaccounts :: Ledger -> Account -> [Account]Source
rawdatespan :: Ledger -> DateSpanSource
ledgeramounts :: Ledger -> [MixedAmount]Source