diff --git a/facho/fe/form/__init__.py b/facho/fe/form/__init__.py index 93d55e8..617fba1 100644 --- a/facho/fe/form/__init__.py +++ b/facho/fe/form/__init__.py @@ -389,7 +389,7 @@ class InvoiceLine: # ya que al reportar los totales es sobre # la factura y el percent es unico por type_code # de subtotal - tax: TaxTotal + tax: typing.Optional[TaxTotal] @property def total_amount(self): @@ -419,6 +419,9 @@ class InvoiceLine: if not isinstance(self.quantity, Quantity): raise ValueError("quantity must be Amount") + if self.tax is None: + self.tax = TaxTotalOmit() + @dataclass class LegalMonetaryTotal: line_extension_amount: Amount = Amount(0.0)