2008-10-03 06:04:15 +04:00
|
|
|
{-|
|
|
|
|
|
|
|
|
An 'Account' stores an account name, all transactions in the account
|
|
|
|
(excluding any subaccounts), and the total balance (including any
|
|
|
|
subaccounts).
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
2008-10-03 04:40:06 +04:00
|
|
|
module Ledger.Account
|
2007-02-15 05:08:18 +03:00
|
|
|
where
|
2008-10-03 04:05:16 +04:00
|
|
|
import Ledger.Utils
|
2008-10-03 04:12:59 +04:00
|
|
|
import Ledger.Types
|
2008-10-03 04:40:06 +04:00
|
|
|
import Ledger.Amount
|
2007-02-15 05:08:18 +03:00
|
|
|
|
|
|
|
|
2008-10-10 12:16:55 +04:00
|
|
|
accounttests = TestList [
|
|
|
|
]
|
|
|
|
|
2007-03-11 01:29:09 +03:00
|
|
|
instance Show Account where
|
2008-10-12 09:07:19 +04:00
|
|
|
show (Account a ts b) = printf "Account %s with %d txns and %s balance" a (length ts) (show b)
|
2007-03-11 01:29:09 +03:00
|
|
|
|
2007-03-11 00:21:04 +03:00
|
|
|
nullacct = Account "" [] nullamt
|
2007-02-15 05:08:18 +03:00
|
|
|
|