penny-lib-0.14.0.0: Extensible double-entry accounting system - library

Safe HaskellNone

Penny.Lincoln.Balance

Synopsis

Documentation

data Balance Source

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.

data Balanced Source

Returned by isBalanced.

Instances

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.

data Column Source

Constructors

Column 

Fields

colDrCr :: DrCr
 
colQty :: Qty
 

Instances