diff --git a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs index 2945cad85..24f122365 100644 --- a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs +++ b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs @@ -285,7 +285,7 @@ acctChanges ReportSpec{_rsQuery=query,_rsReportOpts=ReportOpts{accountlistmode_, declaredacctps = [nullposting{paccount=n} | n <- journalLeafAccountNamesDeclared j , acctq `matchesAccount` n] - where acctq = dbg3 "acctq" $ filterQuery queryIsAcct query + where acctq = dbg3 "acctq" $ filterQueryOrNotQuery queryIsAcct query filterbydepth = case accountlistmode_ of ALTree -> filter ((depthq `matchesAccount`) . aname) -- a tree - just exclude deeper accounts diff --git a/hledger/test/balance/balance.test b/hledger/test/balance/balance.test index 52d0d83ca..f5481bc10 100644 --- a/hledger/test/balance/balance.test +++ b/hledger/test/balance/balance.test @@ -212,13 +212,13 @@ account b >>>= 0 # 12. not:ACCT queries work with declared accounts. -# hledger -f - balance -NE --declared not:a -# <<< -# account a -# account a:aa -# account a:ab -# account a:ac:aca -# account b -# >>> -# 0 b -# >>>= 0 +hledger -f - balance -NE --declared not:a +<<< +account a +account a:aa +account a:ab +account a:ac:aca +account b +>>> + 0 b +>>>= 0