From 217cfbd38966099aea2fd9991c2a66d6bbc2ee70 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 31 Jul 2022 08:25:17 +0100 Subject: [PATCH] imp: errors: assertions: improve sample hledger command --- hledger-lib/Hledger/Data/Balancing.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Data/Balancing.hs b/hledger-lib/Hledger/Data/Balancing.hs index 300a8db6b..ad790191a 100644 --- a/hledger-lib/Hledger/Data/Balancing.hs +++ b/hledger-lib/Hledger/Data/Balancing.hs @@ -607,9 +607,9 @@ checkBalanceAssertionOneCommodityB p@Posting{paccount=assertedacct} assertedamt "but the calculated balance is: %s", -- (at display precision: %s)", "a difference of: %s", "", - "Consider viewing this account's register to troubleshoot. Eg:", + "Consider viewing this account's calculated balances to troubleshoot. Eg:", "", - "hledger reg -I '%s'%s" + "hledger reg '%s'%s -I # -f FILE" ]) (sourcePosPretty pos) (textChomp ex) @@ -623,7 +623,7 @@ checkBalanceAssertionOneCommodityB p@Posting{paccount=assertedacct} assertedamt -- (showAmount actualbalincommodity) (show $ aquantity assertedamt - aquantity actualbalincomm) (acct ++ if isinclusive then "" else "$") - (if istotal then "" else (" cur:'"++T.unpack assertedcomm++"'")) + (if istotal then "" else (" cur:" ++ quoteForCommandLine (T.unpack assertedcomm))) where acct = T.unpack $ paccount p ass = fromJust $ pbalanceassertion p -- PARTIAL: fromJust won't fail, there is a balance assertion