Skip to content

Commit 297cf30

Browse files
committed
;dev: journalValueAndFilterPostingsWith notes [#2371], [#2385]
1 parent 67e656e commit 297cf30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hledger-lib/Hledger/Reports/ReportOptions.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,14 @@ journalValueAndFilterPostings :: ReportSpec -> Journal -> Journal
588588
journalValueAndFilterPostings rspec j = journalValueAndFilterPostingsWith rspec j priceoracle
589589
where priceoracle = journalPriceOracle (infer_prices_ $ _rsReportOpts rspec) j
590590

591+
{- [Querying before valuation]
592+
This helper is used by multiBalanceReport (all balance reports).
593+
Previously, at least since #1625 (2021), it was filtering with the cur:/amt: parts
594+
of the query before valuation, and with the other parts after valuation.
595+
Now, since #2387 (2025), it does all filtering before valuation.
596+
This avoids breaking boolean queries (#2371), avoids a strictness bug (#2385),
597+
is simpler, and we think it's otherwise equivalent.
598+
-}
591599
-- | Like 'journalValueAndFilterPostings', but takes a 'PriceOracle' as an argument.
592600
journalValueAndFilterPostingsWith :: ReportSpec -> Journal -> PriceOracle -> Journal
593601
journalValueAndFilterPostingsWith rspec@ReportSpec{_rsQuery=q, _rsReportOpts=ropts} =

0 commit comments

Comments
 (0)