From 6476d638f9a64c2081b9cfee86bc2e37fa669a55 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 27 Feb 2010 17:54:58 +0000 Subject: [PATCH] sumPostings should always preserve highest precision --- hledger-lib/Ledger/Posting.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Ledger/Posting.hs b/hledger-lib/Ledger/Posting.hs index b296d204c..1a4227422 100644 --- a/hledger-lib/Ledger/Posting.hs +++ b/hledger-lib/Ledger/Posting.hs @@ -67,7 +67,7 @@ accountNamesFromPostings :: [Posting] -> [AccountName] accountNamesFromPostings = nub . map paccount sumPostings :: [Posting] -> MixedAmount -sumPostings = sum . map pamount +sumPostings = sumMixedAmountsPreservingHighestPrecision . map pamount postingDate :: Posting -> Day postingDate p = maybe nulldate tdate $ ptransaction p