forked from elmau/empresa-libre
Actualizar cancelación con XML firmado con CD
This commit is contained in:
commit
a609c0c6f5
|
@ -1,3 +1,8 @@
|
||||||
|
v 1.45.2 [21-Ene-2022]
|
||||||
|
----------------------
|
||||||
|
- Error: Al cancelar un CFDI
|
||||||
|
|
||||||
|
|
||||||
v 1.45.1 [20-Ene-2022]
|
v 1.45.1 [20-Ene-2022]
|
||||||
----------------------
|
----------------------
|
||||||
- Error: Al enviar correos con la nueva configuración
|
- Error: Al enviar correos con la nueva configuración
|
||||||
|
|
|
@ -785,11 +785,15 @@ def cancel_xml_sign(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']]()
|
||||||
|
folio_new = ''
|
||||||
|
if args['uuid']:
|
||||||
|
folio_new = f' FolioSustitucion="{args["uuid"]}"'
|
||||||
data = {
|
data = {
|
||||||
'rfc': certificado.rfc,
|
'rfc': certificado.rfc,
|
||||||
'fecha': now().isoformat()[:19],
|
'fecha': now().isoformat()[:19],
|
||||||
'uuid': str(invoice.uuid).upper(),
|
'uuid': str(invoice.uuid).upper(),
|
||||||
'motivo': args['reason'],
|
'motivo': args['reason'],
|
||||||
|
'folio': folio_new,
|
||||||
}
|
}
|
||||||
template = TEMPLATE_CANCEL.format(**data)
|
template = TEMPLATE_CANCEL.format(**data)
|
||||||
tree = ET.fromstring(template.encode())
|
tree = ET.fromstring(template.encode())
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.45.1'
|
VERSION = '1.45.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)
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ DEFAULT_GLOBAL = {
|
||||||
|
|
||||||
TEMPLATE_CANCEL = """<Cancelacion xmlns="http://cancelacfd.sat.gob.mx" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RfcEmisor="{rfc}" Fecha="{fecha}">
|
TEMPLATE_CANCEL = """<Cancelacion xmlns="http://cancelacfd.sat.gob.mx" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RfcEmisor="{rfc}" Fecha="{fecha}">
|
||||||
<Folios>
|
<Folios>
|
||||||
<Folio UUID={uuid} Motivo={motivo}/>
|
<Folio UUID="{uuid}" Motivo="{motivo}"{folio}/>
|
||||||
</Folios>
|
</Folios>
|
||||||
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||||
<SignedInfo>
|
<SignedInfo>
|
||||||
|
|
Loading…
Reference in New Issue