convert: give an error instead of a silent zero amount from amount-in-field/amount-in-field
This commit is contained in:
parent
0605d5e15d
commit
fe6f37753f
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user