From 144098e4077bbdadd3b719509566aaa3697b7299 Mon Sep 17 00:00:00 2001 From: Henning Thielemann Date: Fri, 13 Sep 2024 01:04:57 +0200 Subject: [PATCH] cli: CompoundBalanceCommand.compoundBalanceReportAsHtml: create according TH cells only if row-total or average is requested fixed bug #2225 --- hledger/Hledger/Cli/CompoundBalanceCommand.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/CompoundBalanceCommand.hs b/hledger/Hledger/Cli/CompoundBalanceCommand.hs index 9839724fe..3d135bdb5 100644 --- a/hledger/Hledger/Cli/CompoundBalanceCommand.hs +++ b/hledger/Hledger/Cli/CompoundBalanceCommand.hs @@ -345,8 +345,8 @@ compoundBalanceReportAsHtml ropts cbr = th_ "" when (layout_ ropts == LayoutBare) $ th_ "Commodity" mconcat $ map (th_ [style_ alignright] . toHtml . reportPeriodName (balanceaccum_ ropts) colspans) colspans - th_ $ if row_total_ ropts then "Total" else "" - th_ $ if average_ ropts then "Average" else "" + when (row_total_ ropts) $ th_ "Total" + when (average_ ropts) $ th_ "Average" ] -- Make rows for a subreport: its title row, not the headings row,