From d70cae64b7e6777d27f1f51cc47687dc07e5a842 Mon Sep 17 00:00:00 2001 From: El Mau Date: Fri, 21 Jan 2022 17:00:59 -0600 Subject: [PATCH] =?UTF-8?q?Actualizar=20cancelaci=C3=B3n=20con=20XML=20fir?= =?UTF-8?q?mado=20con=20CD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ VERSION | 2 +- source/app/controllers/utils.py | 4 ++++ source/app/settings.py | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9915807..4551661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/VERSION b/VERSION index 0c15f2f..e522f07 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -1.45.1 +1.45.2 diff --git a/source/app/controllers/utils.py b/source/app/controllers/utils.py index 6886885..b6b8a90 100644 --- a/source/app/controllers/utils.py +++ b/source/app/controllers/utils.py @@ -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()) diff --git a/source/app/settings.py b/source/app/settings.py index 811f78f..f0d70a1 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -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 = """ - +