sumPostings should always preserve highest precision

This commit is contained in:
Simon Michael 2010-02-27 17:54:58 +00:00
parent cc8f4926cf
commit 6476d638f9

View File

@ -67,7 +67,7 @@ accountNamesFromPostings :: [Posting] -> [AccountName]
accountNamesFromPostings = nub . map paccount accountNamesFromPostings = nub . map paccount
sumPostings :: [Posting] -> MixedAmount sumPostings :: [Posting] -> MixedAmount
sumPostings = sum . map pamount sumPostings = sumMixedAmountsPreservingHighestPrecision . map pamount
postingDate :: Posting -> Day postingDate :: Posting -> Day
postingDate p = maybe nulldate tdate $ ptransaction p postingDate p = maybe nulldate tdate $ ptransaction p