diff --git a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs index 14b43b1e7..b3856d21e 100644 --- a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs +++ b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs @@ -311,12 +311,11 @@ calculateReportMatrix rspec@ReportSpec{_rsReportOpts=ropts} j priceoracle startb -- Transpose to get each account's balance changes across all columns, then -- pad with zeros allchanges = ((<>zeros) <$> acctchanges) <> (zeros <$ startbals) - acctchanges = dbg5 "acctchanges" . addElided $ transposeMap colacctchanges + acctchanges = dbg5 "acctchanges" $ transposeMap colacctchanges colacctchanges = dbg5 "colacctchanges" $ map (second $ acctChangesFromPostings rspec) colps avalue = acctApplyBoth . mixedAmountApplyValuationAfterSumFromOptsWith ropts j priceoracle acctApplyBoth f a = a{aibalance = f $ aibalance a, aebalance = f $ aebalance a} - addElided = if queryDepth (_rsQuery rspec) == Just 0 then HM.insert "..." zeros else id historicalDate = minimumMay $ mapMaybe spanStart colspans zeros = M.fromList [(span, nullacct) | span <- colspans] colspans = map fst colps diff --git a/hledger/test/balance/depth.test b/hledger/test/balance/depth.test index 7f4a94143..c0a962d77 100644 --- a/hledger/test/balance/depth.test +++ b/hledger/test/balance/depth.test @@ -8,20 +8,19 @@ hledger -f sample.journal balance --no-total --depth 1 >>>=0 # 2. Depth 0 aggregates everything into one line -hledger -f sample.journal balance --no-total --depth 0 +hledger -f sample.journal balance --no-total --depth 0 assets >>> - 0 ... + $-1 ... >>>=0 # 3. Ditto in a multi-column balance report. -hledger -f sample.journal balance -M -e 2008/2 --depth 0 +hledger -f sample.journal balance -M -e 2008/2 --depth 0 assets >>> Balance changes in 2008-01: || Jan =====++===== - ... || 0 + ... || $1 -----++----- - || 0 + || $1 >>>=0 -