Fix in cancel with Finkok
This commit is contained in:
commit
434e15bb5b
|
@ -47,7 +47,7 @@ logging.getLogger('zeep').setLevel(logging.ERROR)
|
|||
|
||||
|
||||
TIMEOUT = 10
|
||||
DEBUG_SOAP = True
|
||||
DEBUG_SOAP = False
|
||||
|
||||
|
||||
class DebugPlugin(Plugin):
|
||||
|
@ -190,11 +190,18 @@ class PACFinkok(object):
|
|||
return data
|
||||
|
||||
def _get_data_cancel(self, cfdi):
|
||||
VERSIONS = {
|
||||
'3.3': 'http://www.sat.gob.mx/cfd/3',
|
||||
'4.0': 'http://www.sat.gob.mx/cfd/4',
|
||||
}
|
||||
NS_CFDI = {
|
||||
'cfdi': 'http://www.sat.gob.mx/cfd/3',
|
||||
'tdf': 'http://www.sat.gob.mx/TimbreFiscalDigital',
|
||||
}
|
||||
tree = ET.fromstring(cfdi.encode())
|
||||
|
||||
version = tree.attrib['Version']
|
||||
NS_CFDI['cfdi'] = VERSIONS[version]
|
||||
|
||||
rfc_emisor = tree.xpath(
|
||||
'string(//cfdi:Comprobante/cfdi:Emisor/@Rfc)',
|
||||
namespaces=NS_CFDI)
|
||||
|
@ -223,6 +230,7 @@ class PACFinkok(object):
|
|||
'Motivo': info['args']['reason'],
|
||||
}
|
||||
# ~ 'UUIDS': uuid_type(uuids=sa(string=cfdi_uuid)),
|
||||
|
||||
args = {
|
||||
'UUIDS': uuid_type(ns1_uuid(**data_uuid)),
|
||||
'username': auth['user'],
|
||||
|
|
Loading…
Reference in New Issue