omit transactions with zero amount from register report

This commit is contained in:
Simon Michael 2008-10-16 06:53:08 +00:00
parent dce8fd0dde
commit 628c4241f3

View File

@ -24,7 +24,8 @@ showTransactionsWithBalances opts args l =
startingbalance = nullamt
showTransactionsWithBalances' :: [Transaction] -> Transaction -> Amount -> [String]
showTransactionsWithBalances' [] _ _ = []
showTransactionsWithBalances' (t:ts) tprev b = this ++ rest
showTransactionsWithBalances' (t@Transaction{amount=a}:ts) tprev b =
(if isZeroAmount a then [] else this) ++ rest
where
b' = b + (amount t)
sameentry (Transaction {entryno=e1}) (Transaction {entryno=e2}) = e1 == e2