Safe Haskell | None |
---|
- data Balance
- unBalance :: Balance -> Map Commodity BottomLine
- data Balanced
- = Balanced
- | Inferable (Entry Qty)
- | NotInferable
- balanced :: Balance -> Balanced
- isInferable :: Balanced -> Bool
- entryToBalance :: HasQty q => Entry q -> Balance
- entriesToBalanced :: HasQty q => [Entry q] -> Balanced
- 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 balanced
.
balanced :: Balance -> BalancedSource
Computes whether a Balance map is Balanced.
balanced mempty == Balanced
isInferable :: Balanced -> BoolSource
entryToBalance :: HasQty q => Entry q -> BalanceSource
Converts an Entry to a Balance.
entriesToBalanced :: HasQty q => [Entry q] -> BalancedSource
Converts multiple Entries to a Balanced.
removeZeroCommodities :: Balance -> BalanceSource
Removes zero balances from a Balance.