parsing: don't fail when a csv amount has trailing whitespace (fixes #113)

This commit is contained in:
Simon Michael 2013-06-01 12:36:45 -07:00
parent cc087826e0
commit a26ab926d8

View File

@ -593,7 +593,7 @@ getAmountStr rules record =
mamount = getEffectiveAssignment rules record "amount"
mamountin = getEffectiveAssignment rules record "amount-in"
mamountout = getEffectiveAssignment rules record "amount-out"
render = fmap (renderTemplate rules record)
render = fmap (strip . renderTemplate rules record)
in
case (render mamount, render mamountin, render mamountout) of
(Just "", Nothing, Nothing) -> error' $ "amount has no value\n"++showRecord record