From e97b8b20b8052e30c06e5af0b217a423043a7a86 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 16 Mar 2014 09:40:51 -0700 Subject: [PATCH] balance: make sym: filtering work as expected in multicolumn reports --- hledger-lib/Hledger/Reports.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Reports.hs b/hledger-lib/Hledger/Reports.hs index d56f0e2d0..07b7d333b 100644 --- a/hledger-lib/Hledger/Reports.hs +++ b/hledger-lib/Hledger/Reports.hs @@ -760,7 +760,9 @@ periodBalanceReport opts q j = MultiBalanceReport (spans, items, totals) (q',depthq) = (filterQuery (not . queryIsDepth) q, filterQuery queryIsDepth q) clip = filter (depthq `matchesAccount`) j' = filterJournalPostings q' $ journalSelectingAmountFromOpts opts j - ps = journalPostings j' + ps = journalPostings $ + filterJournalPostingAmounts (filterQuery queryIsSym q) -- remove amount parts which the query's sym: terms would exclude + j' -- the requested span is the span of the query (which is -- based on -b/-e/-p opts and query args IIRC).