From d52283f3140c3bc2c1eec1974de19d61ba87fa75 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 25 May 2010 22:18:36 +0000 Subject: [PATCH] when reporting a balancing error, convert the error amount to cost --- hledger-lib/Hledger/Data/Transaction.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index 501f6a2bb..beb6e16fa 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -155,9 +155,9 @@ nonzerobalanceerror t = printf "could not balance this transaction (%s%s%s)" rms where (rsum, _, bvsum) = transactionPostingBalances t rmsg | isReallyZeroMixedAmountCost rsum = "" - | otherwise = "real postings are off by " ++ show rsum + | otherwise = "real postings are off by " ++ show (costOfMixedAmount rsum) bvmsg | isReallyZeroMixedAmountCost bvsum = "" - | otherwise = "balanced virtual postings are off by " ++ show bvsum + | otherwise = "balanced virtual postings are off by " ++ show (costOfMixedAmount bvsum) sep = if not (null rmsg) && not (null bvmsg) then "; " else "" -- | Convert the primary date to either the actual or effective date.