forked from elmau/empresa-libre
Fix in complement pay without taxes
This commit is contained in:
parent
5aece843bf
commit
482a0385cd
|
@ -594,7 +594,9 @@ class CFDI(object):
|
|||
for row in relacionados:
|
||||
taxes = row.pop('taxes')
|
||||
node = ET.SubElement(node_pago, f'{pre}:DoctoRelacionado', row)
|
||||
node_tax = ET.SubElement(node, f'{pre}:ImpuestosDR')
|
||||
nodex_tax = None
|
||||
if taxes['traslados'] or taxes['retenciones']:
|
||||
node_tax = ET.SubElement(node, f'{pre}:ImpuestosDR')
|
||||
if taxes['retenciones']:
|
||||
node = ET.SubElement(node_tax, f'{pre}:RetencionesDR')
|
||||
for tax in taxes['retenciones']:
|
||||
|
@ -604,7 +606,8 @@ class CFDI(object):
|
|||
for tax in taxes['traslados']:
|
||||
ET.SubElement(node, f'{pre}:TrasladoDR', tax)
|
||||
|
||||
node_tax = ET.SubElement(node_pago, f'{pre}:ImpuestosP')
|
||||
if taxes_pay['traslados'] or taxes_pay['retenciones']:
|
||||
node_tax = ET.SubElement(node_pago, f'{pre}:ImpuestosP')
|
||||
if taxes_pay['retenciones']:
|
||||
node = ET.SubElement(node_tax, f'{pre}:RetencionsP')
|
||||
for key, importe in taxes_pay['retenciones'].items():
|
||||
|
|
|
@ -7581,7 +7581,10 @@ class CfdiPagos(BaseModel):
|
|||
|
||||
# REVISAR
|
||||
r['EquivalenciaDR'] = '1'
|
||||
r['ObjetoImpDR'] = '02'
|
||||
|
||||
r['ObjetoImpDR'] = '01'
|
||||
if r['taxes']['traslados'] or r['taxes']['retenciones']:
|
||||
r['ObjetoImpDR'] = '02'
|
||||
|
||||
r['ImpSaldoAnt'] = FORMAT.format(r['ImpSaldoAnt'])
|
||||
r['ImpPagado'] = FORMAT.format(r['ImpPagado'])
|
||||
|
@ -7610,10 +7613,11 @@ class CfdiPagos(BaseModel):
|
|||
taxes_pay['traslados'][k]['BaseP'] = FORMAT.format(tax_base)
|
||||
taxes_pay['traslados'][k]['ImporteP'] = FORMAT.format(importe)
|
||||
|
||||
taxes_pay['totales'] = {
|
||||
'TotalTrasladosBaseIVA16': FORMAT.format(total_tax_iva_16_base),
|
||||
'TotalTrasladosImpuestoIVA16': FORMAT.format(total_tax_iva_16_importe),
|
||||
}
|
||||
if taxes_pay['traslados']:
|
||||
taxes_pay['totales'] = {
|
||||
'TotalTrasladosBaseIVA16': FORMAT.format(total_tax_iva_16_base),
|
||||
'TotalTrasladosImpuestoIVA16': FORMAT.format(total_tax_iva_16_importe),
|
||||
}
|
||||
|
||||
return related, taxes_pay
|
||||
|
||||
|
@ -10718,8 +10722,6 @@ def get_cp(cp):
|
|||
else:
|
||||
data['colonia'] = [r[3] for r in rows]
|
||||
|
||||
print('CP', cp, data)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
@ -953,6 +953,7 @@ function cmd_complemento_pago_click(){
|
|||
}
|
||||
|
||||
set_data_pay(row)
|
||||
$$('chk_pay_close_when_stamp').setValue(false)
|
||||
$$('multi_bancos').setValue('bank_pay')
|
||||
}
|
||||
|
||||
|
@ -1013,7 +1014,9 @@ function send_stamp_cfdi_pay(id_mov){
|
|||
}
|
||||
})
|
||||
|
||||
$$('multi_bancos').setValue('banco_home')
|
||||
if(close){
|
||||
$$('multi_bancos').setValue('banco_home')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue