From 4d5888aa8d5302b70a7817439cd3fc4c2d5a4fdf Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Fri, 7 Aug 2020 17:02:11 +1000 Subject: [PATCH] cli: No longer force --no-total in compound balance reports when using --percent. --- hledger/Hledger/Cli/CompoundBalanceCommand.hs | 5 +---- tests/incomestatement.test | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hledger/Hledger/Cli/CompoundBalanceCommand.hs b/hledger/Hledger/Cli/CompoundBalanceCommand.hs index a0997c509..682acbe3f 100644 --- a/hledger/Hledger/Cli/CompoundBalanceCommand.hs +++ b/hledger/Hledger/Cli/CompoundBalanceCommand.hs @@ -101,10 +101,7 @@ compoundBalanceCommand CompoundBalanceCommandSpec{..} opts@CliOpts{reportopts_=r _ -> Nothing balancetype = fromMaybe cbctype mBalanceTypeOverride -- Set balance type in the report options. - ropts' = ropts{ - balancetype_=balancetype, - no_total_=if percent_ && length cbcqueries > 1 then True else no_total_ - } + ropts' = ropts{balancetype_=balancetype} title = cbctitle diff --git a/tests/incomestatement.test b/tests/incomestatement.test index a4ffd9866..6222a857b 100644 --- a/tests/incomestatement.test +++ b/tests/incomestatement.test @@ -285,7 +285,7 @@ Income Statement 2008-01-31..2008-12-31 (Historical Ending Balances) >>>= 0 # 8. Percentage test -hledger -f sample.journal incomestatement -p 'quarterly 2008' -T --average -% +hledger -f sample.journal incomestatement -p 'quarterly 2008' -T --average -% --no-total >>> Income Statement 2008