From 513627c9c8a2d480ec74cc0c581c49c6568c8b0e Mon Sep 17 00:00:00 2001 From: "bit4bit@riseup.net" Date: Thu, 5 Nov 2020 02:19:19 +0000 Subject: [PATCH] InvoiceLine.tax se hace opcional es decir usar None. FossilOrigin-Name: aace13352b78e174da241ea47ffe3de9f370653f9e175f2ef2bfe00e4df77ef9 --- facho/fe/form/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)