diff --git a/source/app/controllers/pacs/cfdi_cert.py b/source/app/controllers/pacs/cfdi_cert.py index 4c3a0a2..fe1cf61 100644 --- a/source/app/controllers/pacs/cfdi_cert.py +++ b/source/app/controllers/pacs/cfdi_cert.py @@ -162,16 +162,15 @@ class SATCertificate(object): node = xmlsec.tree.find_node(tree, 'X509Certificate') node.text = self.cer_txt - node = xmlsec.tree.find_node(tree, 'X509IssuerName') - node.text = self.issuer + # ~ node = xmlsec.tree.find_node(tree, 'X509IssuerName') + # ~ node.text = self.issuer node = xmlsec.tree.find_node(tree, 'X509SerialNumber') - node.text = self.serial_number2 - node = xmlsec.tree.find_node(tree, 'SignatureValue') - node.text = node.text.replace('\n', '') + node.text = self.serial_number + # ~ node = xmlsec.tree.find_node(tree, 'SignatureValue') + # ~ node.text = node.text.replace('\n', '') - xml_signed = ET.tostring( - tree, encoding='utf-8', xml_declaration=True).decode() - # ~ xml_signed = xml_signed.replace("'", '"').replace('utf', 'UTF') + xml_signed = ET.tostring(tree, + xml_declaration=True, encoding='UTF-8').decode() return xml_signed diff --git a/source/app/controllers/utils.py b/source/app/controllers/utils.py index 0a8f147..c8ff49c 100644 --- a/source/app/controllers/utils.py +++ b/source/app/controllers/utils.py @@ -682,7 +682,7 @@ def _cancel_with_cert(invoice, auth, certificado): def cancel_xml_sign(invoice, auth, certificado): - return _cancel_with_cert(invoice, auth, certificado) + # ~ return _cancel_with_cert(invoice, auth, certificado) cert = SATCertificate(certificado.cer, certificado.key_enc.encode()) pac = PACS[auth['pac']]() diff --git a/source/app/settings.py b/source/app/settings.py index 7b4a3ff..524bc21 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -250,32 +250,37 @@ DEFAULT_GLOBAL = { 'clave_sat': '01010101', } -TEMPLATE_CANCEL = """ - - {uuid} - - - - - - - - - - - - - - - - - - - - - - - - - -""" +TEMPLATE_CANCEL = """ + + {uuid} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +""" diff --git a/source/xslt/cadena.xslt b/source/xslt/cadena.xslt index 7cf2b91..f77402c 100644 --- a/source/xslt/cadena.xslt +++ b/source/xslt/cadena.xslt @@ -15,6 +15,7 @@ +