Skip to content

Commit

Permalink
imp: errors: assertions: improve sample hledger command
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Jul 31, 2022
1 parent 442ef93 commit 217cfbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hledger-lib/Hledger/Data/Balancing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 217cfbd

Please sign in to comment.