aregister: fix date filtering with disordered txns (fixes #184)
Fix a refactoring-related regression that the tests missed: if transactions were not ordered by date in the journal, register could include postings before the report start date in the output.
This commit is contained in:
parent
120b3b8377
commit
beeed4c10c
@ -66,7 +66,7 @@ postingsReport opts q j = (totallabel, items)
|
|||||||
dbg "ps3" $ (if related_ opts then concatMap relatedPostings else id) $ -- with -r, replace each with its sibling postings
|
dbg "ps3" $ (if related_ opts then concatMap relatedPostings else id) $ -- with -r, replace each with its sibling postings
|
||||||
dbg "ps2" $ filter (reportq `matchesPosting`) $ -- filter postings by the query, including before the report start date, ignoring depth
|
dbg "ps2" $ filter (reportq `matchesPosting`) $ -- filter postings by the query, including before the report start date, ignoring depth
|
||||||
dbg "ps1" $ journalPostings $ journalSelectingAmountFromOpts opts j
|
dbg "ps1" $ journalPostings $ journalSelectingAmountFromOpts opts j
|
||||||
(precedingps, reportps) = dbg "precedingps, reportps" $ span (beforestartq `matchesPosting`) pstoend
|
(precedingps, reportps) = dbg "precedingps, reportps" $ partition (beforestartq `matchesPosting`) pstoend
|
||||||
|
|
||||||
empty = queryEmpty q
|
empty = queryEmpty q
|
||||||
-- displayexpr = display_ opts -- XXX
|
-- displayexpr = display_ opts -- XXX
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user