parsing: don't fail when a csv amount has trailing whitespace (fixes #113)
This commit is contained in:
		
							parent
							
								
									cc087826e0
								
							
						
					
					
						commit
						a26ab926d8
					
				| @ -593,7 +593,7 @@ getAmountStr rules record = | |||||||
|    mamount    = getEffectiveAssignment rules record "amount" |    mamount    = getEffectiveAssignment rules record "amount" | ||||||
|    mamountin  = getEffectiveAssignment rules record "amount-in" |    mamountin  = getEffectiveAssignment rules record "amount-in" | ||||||
|    mamountout = getEffectiveAssignment rules record "amount-out" |    mamountout = getEffectiveAssignment rules record "amount-out" | ||||||
|    render     = fmap (renderTemplate rules record) |    render     = fmap (strip . renderTemplate rules record) | ||||||
|  in |  in | ||||||
|   case (render mamount, render mamountin, render mamountout) of |   case (render mamount, render mamountin, render mamountout) of | ||||||
|     (Just "", Nothing, Nothing) -> error' $ "amount has no value\n"++showRecord record |     (Just "", Nothing, Nothing) -> error' $ "amount has no value\n"++showRecord record | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user