lib: multiBalanceReport: Remove unnecessary addition of parent accounts.

This commit is contained in:
Stephen Morgan 2020-06-14 01:23:55 +10:00
parent e079c8b808
commit fcaec1540a

View File

@ -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