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 |           startingbalance = nullamt | ||||||
|           showTransactionsWithBalances' :: [Transaction] -> Transaction -> Amount -> [String] |           showTransactionsWithBalances' :: [Transaction] -> Transaction -> Amount -> [String] | ||||||
|           showTransactionsWithBalances' [] _ _ = [] |           showTransactionsWithBalances' [] _ _ = [] | ||||||
|           showTransactionsWithBalances' (t:ts) tprev b = this ++ rest |           showTransactionsWithBalances' (t@Transaction{amount=a}:ts) tprev b =  | ||||||
|  |               (if isZeroAmount a then [] else this) ++ rest | ||||||
|               where |               where | ||||||
|                 b' = b + (amount t) |                 b' = b + (amount t) | ||||||
|                 sameentry (Transaction {entryno=e1}) (Transaction {entryno=e2}) = e1 == e2 |                 sameentry (Transaction {entryno=e1}) (Transaction {entryno=e2}) = e1 == e2 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user