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
							
								
									88f18adbc4
								
							
						
					
					
						commit
						2bd785c3fb
					
				| @ -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 "ps2" $ filter (reportq `matchesPosting`) $                         -- filter postings by the query, including before the report start date, ignoring depth | ||||
|           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 | ||||
|       -- displayexpr = display_ opts  -- XXX | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user