forked from elmau/empresa-libre
Error al generar Carta Porte sin remolque
This commit is contained in:
commit
51af15f311
|
@ -1,3 +1,9 @@
|
||||||
|
v 1.46.2 [31-Ene-2022]
|
||||||
|
----------------------
|
||||||
|
- Error: Al generar Carta Porte sin remolque.
|
||||||
|
- Error: Al cancelar con Finkok.
|
||||||
|
|
||||||
|
|
||||||
v 1.46.1 [29-Ene-2022]
|
v 1.46.1 [29-Ene-2022]
|
||||||
----------------------
|
----------------------
|
||||||
- Error: Issue #49
|
- Error: Issue #49
|
||||||
|
|
|
@ -506,7 +506,8 @@ class CFDI(object):
|
||||||
sub_node = ET.SubElement(node, f'{prefix}:Autotransporte', autotransporte)
|
sub_node = ET.SubElement(node, f'{prefix}:Autotransporte', autotransporte)
|
||||||
ET.SubElement(sub_node, f'{prefix}:IdentificacionVehicular', identificacion)
|
ET.SubElement(sub_node, f'{prefix}:IdentificacionVehicular', identificacion)
|
||||||
ET.SubElement(sub_node, f'{prefix}:Seguros', seguros)
|
ET.SubElement(sub_node, f'{prefix}:Seguros', seguros)
|
||||||
if remolque['SubTipoRem'] and remolque['Placa']:
|
if 'SubTipoRem' in remolque and 'Placa' in remolque \
|
||||||
|
and remolque['SubTipoRem'] and remolque['Placa']:
|
||||||
tmp = ET.SubElement(sub_node, f'{prefix}:Remolques')
|
tmp = ET.SubElement(sub_node, f'{prefix}:Remolques')
|
||||||
ET.SubElement(tmp, f'{prefix}:Remolque', remolque)
|
ET.SubElement(tmp, f'{prefix}:Remolque', remolque)
|
||||||
|
|
||||||
|
|
|
@ -768,9 +768,18 @@ def get_pac_by_rfc(cfdi):
|
||||||
def _cancel_with_cert(invoice, args, auth, certificado):
|
def _cancel_with_cert(invoice, args, auth, certificado):
|
||||||
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
||||||
pac = PACS[auth['pac']]()
|
pac = PACS[auth['pac']]()
|
||||||
# ~ info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': '', 'args': args}
|
contra = ''
|
||||||
|
try:
|
||||||
|
contra = decrypt(bytes(certificado.p12).decode(), certificado.serie)
|
||||||
|
except Exception as e:
|
||||||
|
log.error(e)
|
||||||
|
if auth['pac'] == 'comercio':
|
||||||
|
msg = 'Es necesario subir de nuevo los certificados de sello'
|
||||||
|
data = {'ok': False, 'msg': msg, 'row': {}}
|
||||||
|
return data
|
||||||
|
|
||||||
info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'cer_ori': cert.cer,
|
info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'cer_ori': cert.cer,
|
||||||
'key_enc': certificado.key, 'pass': decrypt(bytes(certificado.p12).decode(), certificado.serie), 'args': args}
|
'key_enc': certificado.key, 'pass': contra, 'args': args}
|
||||||
|
|
||||||
result = pac.cancel(invoice.xml, info, auth)
|
result = pac.cancel(invoice.xml, info, auth)
|
||||||
if pac.error:
|
if pac.error:
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.46.1'
|
VERSION = '1.46.2'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue