Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion hledger/Hledger/Cli/Commands/Balance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,12 @@ multiBalanceReportAsTable opts@ReportOpts{summary_only_, average_, balanceaccum_
++ (if not summary_only_ then map (reportPeriodName (period_titles_ opts) balanceaccum_ spans) spans else [])
++ [" Total" | multiBalanceHasTotalsColumn opts]
++ ["Average" | average_]
(accts, rows) = unzip $ fmap fullRowAsTexts items
(accts, rows) = unzip $ fmap fullRowAsTexts items'
where
isLeaf rs row = not $ any (\r -> T.isPrefixOf (displayFull (prrName row) <> ":") (displayFull (prrName r))) rs
items' = if transpose_ opts && tree_ opts
then filter (isLeaf items) items
else items
fullRowAsTexts row = (replicate (length rs) (renderacct row), rs)
where
rs = multiBalanceRowAsText opts row
Expand Down