mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
lib: multiBalanceReport: Remove unnecessary addition of parent accounts.
This commit is contained in:
parent
e079c8b808
commit
fcaec1540a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user