fix: don't reverse account display order with include files (#1909)
This commit is contained in:
		
							parent
							
								
									09d66c5fc1
								
							
						
					
					
						commit
						b46aa1330f
					
				| @ -307,7 +307,11 @@ includedirectivep = do | ||||
|       let r = fromMaybe reader $ findReader Nothing (Just prefixedpath) | ||||
|           parser = rParser r | ||||
|       dbg6IO "trying reader" (rFormat r) | ||||
|       updatedChildj <- journalAddFile (filepath, childInput) <$> | ||||
|       -- Included files's lists are still reversed, because not yet journalFinalise'd, | ||||
|       -- which confuses the calculation of account declaration order across multiple files (#1909). | ||||
|       -- Unreverse just the acct declarations to fix that without disturbing anything else. | ||||
|       let reversedecls j = j{jdeclaredaccounts = reverse $ jdeclaredaccounts j} | ||||
|       updatedChildj <- (journalAddFile (filepath, childInput) . reversedecls) <$> | ||||
|                         parseIncludeFile parser initChildj filepath childInput | ||||
| 
 | ||||
|       -- discard child's parse info,  combine other fields | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user