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

Safe HaskellNone

Penny.Lincoln.Transaction.Unverified

Description

Provides record types to hold the data that are in an unverified transaction. Use these records along with the functions in Transaction to create Transactions. You can create a Transaction only if the postings are balanced.

The functions that create transactions will fail at runtime if the postings are not balanced (this is impossible to enforce at compile time.) However, if you are creating a transaction in which both of the amounts have the same commodity, for which all but one of the entries will have the same DrCr, and in which one of the postings has no entry at all (that is, its entry will be inferred), then it is possible to create a transaction that is guaranteed to be balanced. Use the RPosting and IPosting types for this purpose. (It is necessary for all the postings except for the inferred one to have the same DrCr because otherwise it would be possible to create a transaction in which the inferred posting would have to have an entry with a quantity of zero, which is impossible.

Synopsis

Documentation

data RPosting Source

A restricted posting in which only the quantity is specified; the commodity and DrCr are specified when the transaction is created.

Instances

data IPosting Source

An inferred posting in which no quantity is specified.

Instances