From 4006322f30093378c0366dd21ff38d8ab7dd1d51 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Mon, 26 Jul 2021 22:30:37 -0500 Subject: [PATCH] Fix issue #12 --- source/app/models/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/app/models/main.py b/source/app/models/main.py index 4dc8d69..14b0e1b 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -6746,9 +6746,16 @@ class CfdiPagos(BaseModel): data = {'ok': False, 'msg': msg} return data - auth = Configuracion.get_({'fields': 'pac_auth'}) + # ~ auth = Configuracion.get_({'fields': 'pac_auth'}) + # ~ certificado = Certificado.get(Certificado.es_fiel==False) + # ~ result = utils.cancel_xml_sign(last, auth, certificado) + + pac = utils.get_pac_by_rfc(last.xml) + auth = Configuracion.get_({'fields': 'auth_by_pac', 'pac': pac}) + certificado = Certificado.get(Certificado.es_fiel==False) result = utils.cancel_xml_sign(last, auth, certificado) + if result['ok']: last.estatus = 'Cancelada' last.error = ''