Safe Haskell | None |
---|
- data Balance
- unBalance :: Balance -> Map Commodity BottomLine
- data Balanced
- = Balanced
- | Inferable Entry
- | NotInferable
- isBalanced :: Balance -> Balanced
- entryToBalance :: Entry -> Balance
- addBalances :: Balance -> Balance -> Balance
- removeZeroCommodities :: Balance -> Balance
- data BottomLine
- data Column = Column {}
Documentation
A balance summarizes several entries. You do not create a Balance
directly. Instead, use entryToBalance
.
unBalance :: Balance -> Map Commodity BottomLineSource
Returns a map where the keys are the commodities in the balance and the values are the balance for each commodity. If there is no balance at all, this map can be empty.
Returned by isBalanced
.
isBalanced :: Balance -> BalancedSource
Is this balance balanced?
entryToBalance :: Entry -> BalanceSource
Converts an Entry to a Balance.
addBalances :: Balance -> Balance -> BalanceSource
Add two Balances together. Commodities are never removed from the balance, even if their balance is zero. Instead, they are left in the balance. Sometimes you want to know that a commodity was in the account but its balance is now zero.
removeZeroCommodities :: Balance -> BalanceSource
Removes zero balances from a Balance.