Actualizar cancelación con XML firmado con CD
This commit is contained in:
parent
e40acd28ba
commit
d70cae64b7
|
@ -1,3 +1,8 @@
|
|||
v 1.45.2 [21-Ene-2022]
|
||||
----------------------
|
||||
- Error: Al cancelar un CFDI
|
||||
|
||||
|
||||
v 1.45.1 [20-Ene-2022]
|
||||
----------------------
|
||||
- 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())
|
||||
pac = PACS[auth['pac']]()
|
||||
folio_new = ''
|
||||
if args['uuid']:
|
||||
folio_new = f' FolioSustitucion="{args["uuid"]}"'
|
||||
data = {
|
||||
'rfc': certificado.rfc,
|
||||
'fecha': now().isoformat()[:19],
|
||||
'uuid': str(invoice.uuid).upper(),
|
||||
'motivo': args['reason'],
|
||||
'folio': folio_new,
|
||||
}
|
||||
template = TEMPLATE_CANCEL.format(**data)
|
||||
tree = ET.fromstring(template.encode())
|
||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
|||
|
||||
|
||||
DEBUG = DEBUG
|
||||
VERSION = '1.45.1'
|
||||
VERSION = '1.45.2'
|
||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||
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}">
|
||||
<Folios>
|
||||
<Folio UUID={uuid} Motivo={motivo}/>
|
||||
<Folio UUID="{uuid}" Motivo="{motivo}"{folio}/>
|
||||
</Folios>
|
||||
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||
<SignedInfo>
|
||||
|
|
Loading…
Reference in New Issue