From fcaec1540a5bef610906175f11566f1332bf33fa Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Sun, 14 Jun 2020 01:23:55 +1000 Subject: [PATCH] lib: multiBalanceReport: Remove unnecessary addition of parent accounts. --- hledger-lib/Hledger/Reports/MultiBalanceReport.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs index 2f37cf718..7dfacf987 100644 --- a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs +++ b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs @@ -344,7 +344,7 @@ displayedAccounts ropts q valuedaccts | otherwise = HM.mapWithKey (\a _ -> displayedName a) displayedAccts where -- Accounts which are to be displayed - displayedAccts = HM.filterWithKey keep (valuedaccts <> allParents) + displayedAccts = HM.filterWithKey keep valuedaccts where keep name amts = isInteresting name amts || isInterestingParent name @@ -381,10 +381,6 @@ displayedAccounts ropts q valuedaccts | empty_ ropts || no_elide_ ropts = const True | otherwise = (`HM.member` interestingParents) - allParents - | tree_ ropts = HM.fromList [(a,[]) | a <- expandAccountNames $ HM.keys interestingAccounts] - | otherwise = mempty - isZeroRow balance = all (mixedAmountLooksZero . balance) keepEmpty = empty_ ropts || depth == 0 depth = queryDepth q