Safe Haskell | None |
---|
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.
- data TopLine = TopLine {}
- emptyTopLine :: DateTime -> TopLine
- data Posting = Posting {
- pPayee :: Maybe Payee
- pNumber :: Maybe Number
- pFlag :: Maybe Flag
- pAccount :: Account
- pTags :: Tags
- pEntry :: Maybe Entry
- pMemo :: Maybe Memo
- pPostingLine :: Maybe PostingLine
- pGlobalPosting :: Maybe GlobalPosting
- pFilePosting :: Maybe FilePosting
- emptyPosting :: Account -> Posting
- data RPosting = RPosting {
- rPayee :: Maybe Payee
- rNumber :: Maybe Number
- rFlag :: Maybe Flag
- rAccount :: Account
- rTags :: Tags
- rQty :: Qty
- rMemo :: Maybe Memo
- rPostingLine :: Maybe PostingLine
- rGlobalPosting :: Maybe GlobalPosting
- rFilePosting :: Maybe FilePosting
- emptyRPosting :: Account -> Qty -> RPosting
- data IPosting = IPosting {}
- emptyIPosting :: Account -> IPosting
Documentation
Posting | |
|
emptyPosting :: Account -> PostingSource
A restricted posting
in which only the quantity is specified;
the commodity and DrCr are specified when the transaction is
created.
RPosting | |
|
emptyRPosting :: Account -> Qty -> RPostingSource
An inferred posting
in which no quantity is specified.
IPosting | |
|