Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- posting :: Posting
- post :: AccountName -> Amount -> 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]
- relatedPostings :: Posting -> [Posting]
- postingDate :: Posting -> Day
- postingDate2 :: Posting -> Day
- isPostingInDateSpan :: DateSpan -> Posting -> Bool
- isPostingInDateSpan' :: WhichDate -> DateSpan -> Posting -> Bool
- postingsDateSpan :: [Posting] -> DateSpan
- postingsDateSpan' :: WhichDate -> [Posting] -> DateSpan
- accountNamesFromPostings :: [Posting] -> [AccountName]
- accountNamePostingType :: AccountName -> PostingType
- accountNameWithoutPostingType :: AccountName -> AccountName
- accountNameWithPostingType :: PostingType -> AccountName -> AccountName
- joinAccountNames :: AccountName -> AccountName -> AccountName
- concatAccountNames :: [AccountName] -> AccountName
- accountNameApplyAliases :: [AccountAlias] -> AccountName -> AccountName
- accountNameApplyOneAlias :: [AccountAlias] -> AccountName -> AccountName
- sumPostings :: [Posting] -> MixedAmount
- showPosting :: Posting -> String
- showComment :: String -> String
- tests_Hledger_Data_Posting :: Test
Posting
post :: AccountName -> Amount -> Posting Source
operations
postingCleared :: Posting -> Bool Source
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.
isBalancedVirtual :: Posting -> Bool Source
isEmptyPosting :: Posting -> Bool Source
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 from its postings.
relatedPostings :: Posting -> [Posting] Source
date operations
postingDate :: Posting -> Day Source
Get a posting's (primary) date - it's own primary date if specified, otherwise the parent transaction's primary date, or the null date if there is no parent transaction.
postingDate2 :: Posting -> Day Source
Get a posting's secondary (secondary) date, which is the first of: posting's secondary date, transaction's secondary date, posting's primary date, transaction's primary date, or the null date if there is no parent transaction.
isPostingInDateSpan :: DateSpan -> Posting -> Bool Source
Does this posting fall within the given date span ?
postingsDateSpan :: [Posting] -> DateSpan Source
Get the minimal date span which contains all the postings, or the null date span if there are none.
postingsDateSpan' :: WhichDate -> [Posting] -> DateSpan Source
account name operations
accountNamesFromPostings :: [Posting] -> [AccountName] Source
joinAccountNames :: AccountName -> AccountName -> AccountName Source
Prefix one account name to another, preserving posting type indicators like concatAccountNames.
concatAccountNames :: [AccountName] -> AccountName Source
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 :: [AccountAlias] -> AccountName -> AccountName Source
Rewrite an account name using all applicable aliases from the given list, in sequence.
accountNameApplyOneAlias :: [AccountAlias] -> AccountName -> AccountName Source
Rewrite an account name using the first applicable alias from the given list, if any.
arithmetic
sumPostings :: [Posting] -> MixedAmount Source
rendering
showPosting :: Posting -> String Source
misc.
showComment :: String -> String Source