convert: give an error instead of a silent zero amount from amount-in-field/amount-in-field

This commit is contained in:
Simon Michael 2011-09-28 00:14:42 +00:00
parent 0605d5e15d
commit fe6f37753f

View File

@ -481,7 +481,7 @@ getAmount rules fields = case amountField rules of
case (c, d) of
(x, "") -> x
("", x) -> "-"++x
_ -> ""
p -> error' $ "using amount-in-field and amount-out-field, found a value in both fields: "++show p
where
c = maybe "" (atDef "" fields) (inField rules)
d = maybe "" (atDef "" fields) (outField rules)