From 3dca1ca54891a8edca0d4f29212331ba17ff5d67 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 15 Oct 2008 07:06:02 +0000 Subject: [PATCH] make isZeroAmount more robust, fix timelog balance total --- Ledger/Amount.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Ledger/Amount.hs b/Ledger/Amount.hs index 96682a0ee..d8c3b2183 100644 --- a/Ledger/Amount.hs +++ b/Ledger/Amount.hs @@ -75,10 +75,7 @@ showAmountOrZero a -- | is this amount zero, when displayed with its given precision ? isZeroAmount :: Amount -> Bool isZeroAmount a@(Amount c _ ) = nonzerodigits == "" - where - nonzerodigits = filter (flip notElem "-+,.0") quantitystr - quantitystr = withoutsymbol $ showAmount a - withoutsymbol = drop (length $ symbol c) -- XXX + where nonzerodigits = filter (`elem` "123456789") $ showAmount a instance Num Amount where abs (Amount c q) = Amount c (abs q)