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

Safe HaskellSafe-Infered

Penny.Lincoln.Balance

Synopsis

Documentation

data Balance Source

A balance summarizes several entries. You do not create a Balance directly. Instead, use entryToBalance. Balance used to be a monoid, but there is nothing appropriate for mempty. Instead, Balance is really a semigroup, but not a monoid.

unBalance :: Balance -> Map Commodity BottomLineSource

The map returned by unBalance is never 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 -> Maybe BalanceSource

Removes zero balances from a Balance. Will not return a Balance with no commodities; instead, returns Nothing if there would be a balance with no commodities.

data Column Source

Constructors

Column 

Fields

drCr :: DrCr
 
qty :: Qty
 

Instances