From bb5e64c75f09516c6e342147738caedf368a7c6f Mon Sep 17 00:00:00 2001 From: Henning Thielemann Date: Tue, 1 Oct 2024 11:09:56 +0200 Subject: [PATCH] cli: Cli.Commands.Balance.budgetReportAsSpreadsheet: vertically merge duplicate account name cells This is consistent with simple balance and multi-period balance reports. --- hledger/Hledger/Cli/Commands/Balance.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Balance.hs b/hledger/Hledger/Cli/Commands/Balance.hs index 773377abd..aba77533d 100644 --- a/hledger/Hledger/Cli/Commands/Balance.hs +++ b/hledger/Hledger/Cli/Commands/Balance.hs @@ -1316,7 +1316,8 @@ budgetReportAsSpreadsheet rowAsTexts rc render row@(PeriodicReportRow _ as (rowtot,budgettot) (rowavg, budgetavg)) | layout_ /= LayoutBare = [accountCell : map showNorm vals] | otherwise = - joinNames . zipWith (:) (map cell cs) -- add symbols and names + addRowSpanHeader accountCell -- add name + . zipWith (:) (map cell cs) -- add symbols . transpose -- each row becomes a list of Text quantities . map (map (fmap wbToText) . cellsFromMixedAmount dopts . second (fromMaybe nullmixedamt)) $ vals @@ -1331,7 +1332,6 @@ budgetReportAsSpreadsheet (budgetAverageClass rc, budgetavg)] | average_] - joinNames = map (accountCell :) accountCell = let name = render row in setAccountAnchor (guard (rc==Value) >> balance_base_url_)