cli: Cli.Commands.Balance.budgetReportAsSpreadsheet: vertically merge duplicate account name cells
This is consistent with simple balance and multi-period balance reports.
This commit is contained in:
parent
41397d0ca4
commit
bb5e64c75f
@ -1316,7 +1316,8 @@ budgetReportAsSpreadsheet
|
|||||||
rowAsTexts rc render row@(PeriodicReportRow _ as (rowtot,budgettot) (rowavg, budgetavg))
|
rowAsTexts rc render row@(PeriodicReportRow _ as (rowtot,budgettot) (rowavg, budgetavg))
|
||||||
| layout_ /= LayoutBare = [accountCell : map showNorm vals]
|
| layout_ /= LayoutBare = [accountCell : map showNorm vals]
|
||||||
| otherwise =
|
| 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
|
. transpose -- each row becomes a list of Text quantities
|
||||||
. map (map (fmap wbToText) . cellsFromMixedAmount dopts . second (fromMaybe nullmixedamt))
|
. map (map (fmap wbToText) . cellsFromMixedAmount dopts . second (fromMaybe nullmixedamt))
|
||||||
$ vals
|
$ vals
|
||||||
@ -1331,7 +1332,6 @@ budgetReportAsSpreadsheet
|
|||||||
(budgetAverageClass rc, budgetavg)]
|
(budgetAverageClass rc, budgetavg)]
|
||||||
| average_]
|
| average_]
|
||||||
|
|
||||||
joinNames = map (accountCell :)
|
|
||||||
accountCell =
|
accountCell =
|
||||||
let name = render row in
|
let name = render row in
|
||||||
setAccountAnchor (guard (rc==Value) >> balance_base_url_)
|
setAccountAnchor (guard (rc==Value) >> balance_base_url_)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user