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 = ''