diff --git a/hledger-lib/Ledger/Transaction.hs b/hledger-lib/Ledger/Transaction.hs index a95793130..0f79fc548 100644 --- a/hledger-lib/Ledger/Transaction.hs +++ b/hledger-lib/Ledger/Transaction.hs @@ -139,7 +139,7 @@ balanceTransaction t@Transaction{tpostings=ps} balance p | isReal p && not (hasAmount p) = p{pamount = costOfMixedAmount (-otherstotal)} | otherwise = p where otherstotal = sum $ map pamount withamounts - printerr s = unlines [s, showTransactionUnelided t] + printerr s = intercalate "\n" [s, showTransactionUnelided t] nonzerobalanceerror :: Transaction -> String nonzerobalanceerror t = printf "could not balance this transaction (%s%s%s)" rmsg sep bvmsg diff --git a/tests/unbalanced.test b/tests/unbalanced.test index a256f00fe..c5b592864 100644 --- a/tests/unbalanced.test +++ b/tests/unbalanced.test @@ -6,7 +6,7 @@ >>>2 "-" (line 4, column 1): unexpected end of input -could not balance this transaction (real postings are off by 0.1): +could not balance this transaction (real postings are off by 0.1) 2009/01/01 a b 1.1 c -1 diff --git a/tests/unicode-error-message.test b/tests/unicode-error-message.test index 16fe0618f..b55e23587 100644 --- a/tests/unicode-error-message.test +++ b/tests/unicode-error-message.test @@ -6,7 +6,7 @@ >>>2 "-" (line 4, column 1): unexpected end of input -could not balance this transaction (real postings are off by -1): +could not balance this transaction (real postings are off by -1) 2009/01/01 broken entry дебит 1 кредит -2