From e6959743f54a2fa2ede3f29e4bb262ce68b4d509 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 12 Jul 2022 16:33:51 +0100 Subject: [PATCH] fix: errors: assertions: don't show actual and asserted reversed --- hledger-lib/Hledger/Data/Balancing.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Balancing.hs b/hledger-lib/Hledger/Data/Balancing.hs index 03b6f72d1..351f997d3 100644 --- a/hledger-lib/Hledger/Data/Balancing.hs +++ b/hledger-lib/Hledger/Data/Balancing.hs @@ -603,10 +603,10 @@ checkBalanceAssertionOneCommodityB p@Posting{paccount=assertedacct} assertedamt assertedcomm (if istotal then " (no other commodity balance allowed)" else "" :: String) -- (asprecision $ astyle actualbalincommodity) -- should be the standard display precision I think - (show $ aquantity actualbalincomm) - -- (showAmount actualbalincommodity) (show $ aquantity assertedamt) -- (showAmount assertedamt) + (show $ aquantity actualbalincomm) + -- (showAmount actualbalincommodity) (show $ aquantity assertedamt - aquantity actualbalincomm) where ass = fromJust $ pbalanceassertion p -- PARTIAL: fromJust won't fail, there is a balance assertion