diff --git a/RegisterCommand.hs b/RegisterCommand.hs index 9fa0d1af4..4bd35a04b 100644 --- a/RegisterCommand.hs +++ b/RegisterCommand.hs @@ -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