penny-0.32.0.8: Extensible double-entry accounting system

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.

Instances

Eq Balance 
Show Balance 
Monoid Balance

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.

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 balanced.

Instances

balanced :: Balance -> BalancedSource

Computes whether a Balance map is Balanced.

 balanced mempty == Balanced

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.

data Column Source

Constructors

Column 

Fields

colDrCr :: DrCr
 
colQty :: Qty
 

Instances