cli: No longer force --no-total in compound balance reports when using --percent.

This commit is contained in:
Stephen Morgan 2020-08-07 17:02:11 +10:00 committed by Simon Michael
parent 242f1ecfef
commit 4d5888aa8d
2 changed files with 2 additions and 5 deletions

View File

@ -101,10 +101,7 @@ compoundBalanceCommand CompoundBalanceCommandSpec{..} opts@CliOpts{reportopts_=r
_ -> Nothing _ -> Nothing
balancetype = fromMaybe cbctype mBalanceTypeOverride balancetype = fromMaybe cbctype mBalanceTypeOverride
-- Set balance type in the report options. -- Set balance type in the report options.
ropts' = ropts{ ropts' = ropts{balancetype_=balancetype}
balancetype_=balancetype,
no_total_=if percent_ && length cbcqueries > 1 then True else no_total_
}
title = title =
cbctitle cbctitle

View File

@ -285,7 +285,7 @@ Income Statement 2008-01-31..2008-12-31 (Historical Ending Balances)
>>>= 0 >>>= 0
# 8. Percentage test # 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 Income Statement 2008