From 8bc67d5ee8f57b78a81e630b5b0a696261deb0b4 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 14 Jan 2017 10:29:33 -0800 Subject: [PATCH] print: don't lose the commodity in zero balance assertions. Related to #475 --- hledger-lib/Hledger/Data/Transaction.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index 8a50ccd89..64d12dacc 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -193,7 +193,7 @@ postingAsLines elideamount onelineamounts ps p = concat [ | postingblock <- postingblocks] where postingblocks = [map rstrip $ lines $ concatTopPadded [account, " ", amount, assertion, samelinecomment] | amount <- shownAmounts] - assertion = maybe "" ((" = " ++) . showAmount) $ pbalanceassertion p + assertion = maybe "" ((" = " ++) . showAmountWithZeroCommodity) $ pbalanceassertion p account = indent $ showstatus p ++ fitString (Just acctwidth) Nothing False True (showAccountName Nothing (ptype p) (paccount p))