diff --git a/hledger-lib/Hledger/Data/Balancing.hs b/hledger-lib/Hledger/Data/Balancing.hs index 031a6e888..5f3c9767c 100644 --- a/hledger-lib/Hledger/Data/Balancing.hs +++ b/hledger-lib/Hledger/Data/Balancing.hs @@ -131,11 +131,17 @@ transactionCheckBalanced BalancingOpts{commodity_styles_} t = errs rmsg | rsumok = "" | not rsignsok = "The real postings all have the same sign. Consider negating some of them." - | otherwise = "The real postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutCost False rsumcost + | otherwise = "The real postings' sum should be 0 but is: " ++ + (showMixedAmountWith oneLineNoCostFmt{displayCost=True, displayZeroCommodity=True} $ + mixedAmountSetFullPrecisionUpTo Nothing $ mixedAmountSetFullPrecision + rsumcost) bvmsg | bvsumok = "" | not bvsignsok = "The balanced virtual postings all have the same sign. Consider negating some of them." - | otherwise = "The balanced virtual postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutCost False bvsumcost + | otherwise = "The balanced virtual postings' sum should be 0 but is: " ++ + (showMixedAmountWith oneLineNoCostFmt{displayCost=True, displayZeroCommodity=True} $ + mixedAmountSetFullPrecisionUpTo Nothing $ mixedAmountSetFullPrecision + bvsumcost) -- | Legacy form of transactionCheckBalanced. isTransactionBalanced :: BalancingOpts -> Transaction -> Bool