diff --git a/hledger-lib/Hledger/Data/Amount.hs b/hledger-lib/Hledger/Data/Amount.hs index f38071ea6..94b603127 100644 --- a/hledger-lib/Hledger/Data/Amount.hs +++ b/hledger-lib/Hledger/Data/Amount.hs @@ -781,11 +781,11 @@ mixedAmountUnstyled = mapMixedAmountUnsafe amountUnstyled showMixedAmount :: MixedAmount -> String showMixedAmount = wbUnpack . showMixedAmountB noColour --- | Get the one-line string representation of a mixed amount. +-- | Get the one-line string representation of a mixed amount (also showing any costs). -- -- > showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine showMixedAmountOneLine :: MixedAmount -> String -showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine +showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine{displayPrice=True} -- | Like showMixedAmount, but zero amounts are shown with their -- commodity if they have one. diff --git a/hledger-lib/Hledger/Data/Balancing.hs b/hledger-lib/Hledger/Data/Balancing.hs index 3e3e25f66..086cae68d 100644 --- a/hledger-lib/Hledger/Data/Balancing.hs +++ b/hledger-lib/Hledger/Data/Balancing.hs @@ -118,11 +118,11 @@ 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: " ++ showMixedAmountOneLine rsumcost + | otherwise = "The real postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutPrice False 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: " ++ showMixedAmountOneLine bvsumcost + | otherwise = "The balanced virtual postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutPrice False bvsumcost -- | Legacy form of transactionCheckBalanced. isTransactionBalanced :: BalancingOpts -> Transaction -> Bool