mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 15:14:49 +03:00
omit transactions with zero amount from register report
This commit is contained in:
parent
dce8fd0dde
commit
628c4241f3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user