facho/fe/form.py(Amount): solo permite positivos.
FossilOrigin-Name: 220d676ea89de7c4562375be0d71d0b8b410d146a828969d56fc30d1e4532835
This commit is contained in:
		| @@ -55,6 +55,10 @@ class AmountCollection(Collection): | ||||
| class Amount: | ||||
|     def __init__(self, amount: int or float or Amount, currency: Currency = Currency('COP')): | ||||
|  | ||||
|         #DIAN 1.7.-2020: 1.2.3.1 | ||||
|         if amount < 0: | ||||
|             raise ValueError('amount must be positive >= 0') | ||||
|          | ||||
|         if isinstance(amount, Amount): | ||||
|             self.amount = amount.amount | ||||
|             self.currency = amount.currency | ||||
|   | ||||
		Reference in New Issue
	
	Block a user