cacheLedger cleanup
This commit is contained in:
parent
fc928ba278
commit
f7b2e62bcb
@ -33,10 +33,9 @@ instance Show Ledger where
|
|||||||
cacheLedger :: [String] -> RawLedger -> Ledger
|
cacheLedger :: [String] -> RawLedger -> Ledger
|
||||||
cacheLedger apats l = Ledger{rawledgertext="",rawledger=l,accountnametree=ant,accountmap=acctmap}
|
cacheLedger apats l = Ledger{rawledgertext="",rawledger=l,accountnametree=ant,accountmap=acctmap}
|
||||||
where
|
where
|
||||||
|
(ant,txnsof,_,inclbalof) = groupTransactions $ filtertxns apats $ rawLedgerTransactions l
|
||||||
acctmap = Map.fromList [(a, mkacct a) | a <- flatten ant]
|
acctmap = Map.fromList [(a, mkacct a) | a <- flatten ant]
|
||||||
mkacct a = Account a (txnsof a) (inclbalof a)
|
where mkacct a = Account a (txnsof a) (inclbalof a)
|
||||||
ts = filtertxns apats $ rawLedgerTransactions l
|
|
||||||
(ant,txnsof,_,inclbalof) = groupTransactions ts
|
|
||||||
|
|
||||||
-- | Given a list of transactions, return an account name tree and three
|
-- | Given a list of transactions, return an account name tree and three
|
||||||
-- query functions that fetch transactions, balance, and
|
-- query functions that fetch transactions, balance, and
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user