Fix in tax IVA retention
This commit is contained in:
commit
50cbb3bae8
|
@ -7681,10 +7681,14 @@ class CfdiPagos(BaseModel):
|
|||
total_tax_iva_16_base = 0
|
||||
total_tax_iva_16_importe = 0
|
||||
total_tax_retenciones_isr_importe = 0
|
||||
total_tax_retenciones_iva_importe = 0
|
||||
|
||||
for key, importe in taxes_pay['retenciones'].items():
|
||||
taxes_pay['retenciones'][key] = FORMAT.format(importe)
|
||||
total_tax_retenciones_isr_importe += importe
|
||||
if key == '002':
|
||||
total_tax_retenciones_iva_importe += importe
|
||||
else:
|
||||
total_tax_retenciones_isr_importe += importe
|
||||
|
||||
for k, tax in taxes_pay['traslados'].items():
|
||||
tax_type = taxes_pay['traslados'][k]['ImpuestoP']
|
||||
|
@ -7708,7 +7712,10 @@ class CfdiPagos(BaseModel):
|
|||
taxes_pay['totales']['TotalTrasladosImpuestoIVA16'] = FORMAT.format(total_tax_iva_16_importe)
|
||||
|
||||
if taxes_pay['retenciones']:
|
||||
taxes_pay['totales']['TotalRetencionesISR'] = FORMAT.format(total_tax_retenciones_isr_importe)
|
||||
if total_tax_retenciones_isr_importe:
|
||||
taxes_pay['totales']['TotalRetencionesISR'] = FORMAT.format(total_tax_retenciones_isr_importe)
|
||||
if total_tax_retenciones_iva_importe:
|
||||
taxes_pay['totales']['TotalRetencionesIVA'] = FORMAT.format(total_tax_retenciones_iva_importe)
|
||||
|
||||
return related, taxes_pay
|
||||
|
||||
|
|
Loading…
Reference in New Issue