Return data in stamp
This commit is contained in:
parent
645560ef38
commit
d3c7c17f91
|
@ -78,8 +78,8 @@ class PACComercioDigital(object):
|
|||
|
||||
def __init__(self):
|
||||
self.error = ''
|
||||
self.cfdi_uuid = ''
|
||||
self.date_stamped = ''
|
||||
# ~ self.cfdi_uuid = ''
|
||||
# ~ self.date_stamped = ''
|
||||
|
||||
def _error(self, msg):
|
||||
self.error = str(msg)
|
||||
|
@ -133,14 +133,19 @@ class PACComercioDigital(object):
|
|||
|
||||
xml = result.content
|
||||
tree = ET.fromstring(xml)
|
||||
self.cfdi_uuid = tree.xpath(
|
||||
cfdi_uuid = tree.xpath(
|
||||
'string(//cfdi:Complemento/tdf:TimbreFiscalDigital/@UUID)',
|
||||
namespaces=self.NS_CFDI)
|
||||
self.date_stamped = tree.xpath(
|
||||
date_stamped = tree.xpath(
|
||||
'string(//cfdi:Complemento/tdf:TimbreFiscalDigital/@FechaTimbrado)',
|
||||
namespaces=self.NS_CFDI)
|
||||
|
||||
return xml.decode()
|
||||
data = {
|
||||
'xml': xml.decode(),
|
||||
'uuid': cfdi_uuid,
|
||||
'date': date_stamped,
|
||||
}
|
||||
return data
|
||||
|
||||
def _get_data_cancel(self, cfdi, info, auth):
|
||||
NS_CFDI = {
|
||||
|
|
Loading…
Reference in New Issue