Fix in taxes in invoice pay
This commit is contained in:
commit
a078e27703
|
@ -7676,6 +7676,7 @@ class CfdiPagos(BaseModel):
|
||||||
return impuestos
|
return impuestos
|
||||||
|
|
||||||
def _get_related_xml(self, id_mov, currency):
|
def _get_related_xml(self, id_mov, currency):
|
||||||
|
#TAX ToDo
|
||||||
TAX_IVA_16 = '002|0.160000'
|
TAX_IVA_16 = '002|0.160000'
|
||||||
TAX_IVA_0 = '002|0.000000'
|
TAX_IVA_0 = '002|0.000000'
|
||||||
|
|
||||||
|
@ -7746,10 +7747,10 @@ class CfdiPagos(BaseModel):
|
||||||
|
|
||||||
current_tax = f'{tax_type}|{tax_tasa}'
|
current_tax = f'{tax_type}|{tax_tasa}'
|
||||||
if current_tax == TAX_IVA_16:
|
if current_tax == TAX_IVA_16:
|
||||||
new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
|
# ~ new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
|
||||||
while new_import_tax > importe:
|
# ~ while new_import_tax > importe:
|
||||||
tax_base -= Decimal(0.01)
|
# ~ tax_base -= Decimal(0.01)
|
||||||
new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
|
# ~ new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
|
||||||
total_tax_iva_16_base += tax_base
|
total_tax_iva_16_base += tax_base
|
||||||
total_tax_iva_16_importe += importe
|
total_tax_iva_16_importe += importe
|
||||||
elif current_tax == TAX_IVA_0:
|
elif current_tax == TAX_IVA_0:
|
||||||
|
|
Loading…
Reference in New Issue