InvoiceLine.tax se hace opcional es decir usar None.
FossilOrigin-Name: aace13352b78e174da241ea47ffe3de9f370653f9e175f2ef2bfe00e4df77ef9
This commit is contained in:
parent
54382267ba
commit
513627c9c8
@ -389,7 +389,7 @@ class InvoiceLine:
|
|||||||
# ya que al reportar los totales es sobre
|
# ya que al reportar los totales es sobre
|
||||||
# la factura y el percent es unico por type_code
|
# la factura y el percent es unico por type_code
|
||||||
# de subtotal
|
# de subtotal
|
||||||
tax: TaxTotal
|
tax: typing.Optional[TaxTotal]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def total_amount(self):
|
def total_amount(self):
|
||||||
@ -419,6 +419,9 @@ class InvoiceLine:
|
|||||||
if not isinstance(self.quantity, Quantity):
|
if not isinstance(self.quantity, Quantity):
|
||||||
raise ValueError("quantity must be Amount")
|
raise ValueError("quantity must be Amount")
|
||||||
|
|
||||||
|
if self.tax is None:
|
||||||
|
self.tax = TaxTotalOmit()
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class LegalMonetaryTotal:
|
class LegalMonetaryTotal:
|
||||||
line_extension_amount: Amount = Amount(0.0)
|
line_extension_amount: Amount = Amount(0.0)
|
||||||
|
Loading…
Reference in New Issue
Block a user