forked from elmau/empresa-libre
Agregar archivos requeridos para CartaPorte 2.0
This commit is contained in:
parent
4a84654117
commit
69402e03bb
|
@ -162,16 +162,15 @@ class SATCertificate(object):
|
||||||
|
|
||||||
node = xmlsec.tree.find_node(tree, 'X509Certificate')
|
node = xmlsec.tree.find_node(tree, 'X509Certificate')
|
||||||
node.text = self.cer_txt
|
node.text = self.cer_txt
|
||||||
node = xmlsec.tree.find_node(tree, 'X509IssuerName')
|
# ~ node = xmlsec.tree.find_node(tree, 'X509IssuerName')
|
||||||
node.text = self.issuer
|
# ~ node.text = self.issuer
|
||||||
node = xmlsec.tree.find_node(tree, 'X509SerialNumber')
|
node = xmlsec.tree.find_node(tree, 'X509SerialNumber')
|
||||||
node.text = self.serial_number2
|
node.text = self.serial_number
|
||||||
node = xmlsec.tree.find_node(tree, 'SignatureValue')
|
# ~ node = xmlsec.tree.find_node(tree, 'SignatureValue')
|
||||||
node.text = node.text.replace('\n', '')
|
# ~ node.text = node.text.replace('\n', '')
|
||||||
|
|
||||||
xml_signed = ET.tostring(
|
xml_signed = ET.tostring(tree,
|
||||||
tree, encoding='utf-8', xml_declaration=True).decode()
|
xml_declaration=True, encoding='UTF-8').decode()
|
||||||
# ~ xml_signed = xml_signed.replace("'", '"').replace('utf', 'UTF')
|
|
||||||
|
|
||||||
return xml_signed
|
return xml_signed
|
||||||
|
|
||||||
|
|
|
@ -682,7 +682,7 @@ def _cancel_with_cert(invoice, auth, certificado):
|
||||||
|
|
||||||
|
|
||||||
def cancel_xml_sign(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())
|
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
||||||
pac = PACS[auth['pac']]()
|
pac = PACS[auth['pac']]()
|
||||||
|
|
|
@ -250,7 +250,7 @@ DEFAULT_GLOBAL = {
|
||||||
'clave_sat': '01010101',
|
'clave_sat': '01010101',
|
||||||
}
|
}
|
||||||
|
|
||||||
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" Fecha="{fecha}" RfcEmisor="{rfc}">
|
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>
|
<Folios>
|
||||||
<UUID>{uuid}</UUID>
|
<UUID>{uuid}</UUID>
|
||||||
</Folios>
|
</Folios>
|
||||||
|
@ -275,7 +275,12 @@ TEMPLATE_CANCEL = """<Cancelacion xmlns="http://cancelacfd.sat.gob.mx" xmlns:xsd
|
||||||
</X509IssuerSerial>
|
</X509IssuerSerial>
|
||||||
<X509Certificate/>
|
<X509Certificate/>
|
||||||
</X509Data>
|
</X509Data>
|
||||||
|
<KeyValue>
|
||||||
|
<RSAKeyValue>
|
||||||
|
<Modulus/>
|
||||||
|
<Exponent/>
|
||||||
|
</RSAKeyValue>
|
||||||
|
</KeyValue>
|
||||||
</KeyInfo>
|
</KeyInfo>
|
||||||
</Signature>
|
</Signature>
|
||||||
</Cancelacion>
|
</Cancelacion>"""
|
||||||
"""
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<xsl:include href="pagos10.xslt"/>
|
<xsl:include href="pagos10.xslt"/>
|
||||||
<xsl:include href="divisas.xslt"/>
|
<xsl:include href="divisas.xslt"/>
|
||||||
<xsl:include href="servicioconstruccion.xslt"/>
|
<xsl:include href="servicioconstruccion.xslt"/>
|
||||||
|
<xsl:include href="cartaporte20.xslt"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<xsl:include href="ecc11.xslt"/>
|
<xsl:include href="ecc11.xslt"/>
|
||||||
|
|
Loading…
Reference in New Issue