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