Safe Haskell | None |
---|
A Posting
represents a change (by some MixedAmount
) of the balance in
some Account
. Each Transaction
contains two or more postings which
should add up to 0. Postings reference their parent transaction, so we can
look up the date or description there.
- nullposting :: Posting
- postingCleared :: Posting -> Bool
- isReal :: Posting -> Bool
- isVirtual :: Posting -> Bool
- isBalancedVirtual :: Posting -> Bool
- isEmptyPosting :: Posting -> Bool
- hasAmount :: Posting -> Bool
- postingAllTags :: Posting -> [Tag]
- transactionAllTags :: Transaction -> [Tag]
- postingDate :: Posting -> Day
- isPostingInDateSpan :: DateSpan -> Posting -> Bool
- postingsDateSpan :: [Posting] -> DateSpan
- accountNamesFromPostings :: [Posting] -> [AccountName]
- accountNamePostingType :: AccountName -> PostingType
- accountNameWithoutPostingType :: AccountName -> AccountName
- accountNameWithPostingType :: PostingType -> AccountName -> AccountName
- joinAccountNames :: AccountName -> AccountName -> AccountName
- concatAccountNames :: [AccountName] -> AccountName
- accountNameApplyAliases :: [(AccountName, AccountName)] -> AccountName -> AccountName
- sumPostings :: [Posting] -> MixedAmount
- showPosting :: Posting -> String
- showPostingForRegister :: Posting -> String
- postingTagsAsLines :: Posting -> [String]
- tagsAsLines :: [(String, String)] -> [String]
- showComment :: String -> String
- tests_Hledger_Data_Posting :: Test
Posting
operations
postingCleared :: Posting -> BoolSource
Is this posting cleared? If this posting was individually marked as cleared, returns True. Otherwise, return the parent transaction's cleared status or, if there is no parent transaction, return False.
isEmptyPosting :: Posting -> BoolSource
postingAllTags :: Posting -> [Tag]Source
Tags for this posting including any inherited from its parent transaction.
transactionAllTags :: Transaction -> [Tag]Source
Tags for this transaction including any inherited from above, when that is implemented.
date operations
postingDate :: Posting -> DaySource
isPostingInDateSpan :: DateSpan -> Posting -> BoolSource
Does this posting fall within the given date span ?
postingsDateSpan :: [Posting] -> DateSpanSource
Get the minimal date span which contains all the postings, or the null date span if there are none.
account name operations
accountNamesFromPostings :: [Posting] -> [AccountName]Source
joinAccountNames :: AccountName -> AccountName -> AccountNameSource
Prefix one account name to another, preserving posting type indicators like concatAccountNames.
concatAccountNames :: [AccountName] -> AccountNameSource
Join account names into one. If any of them has () or [] posting type indicators, these (the first type encountered) will also be applied to the resulting account name.
accountNameApplyAliases :: [(AccountName, AccountName)] -> AccountName -> AccountNameSource
Rewrite an account name using the first applicable alias from the given list, if any.
arithmetic
sumPostings :: [Posting] -> MixedAmountSource
rendering
showPosting :: Posting -> StringSource
misc.
postingTagsAsLines :: Posting -> [String]Source
tagsAsLines :: [(String, String)] -> [String]Source
showComment :: String -> StringSource