Fix - Issue #185
This commit is contained in:
parent
ac4df43835
commit
a1a17732e8
|
@ -1379,7 +1379,6 @@ def to_letters(value, moneda):
|
|||
|
||||
|
||||
def get_qr(data):
|
||||
# ~ path = tempfile.mkstemp()[1]
|
||||
path = get_path_temp('.qr')
|
||||
qr = pyqrcode.create(data, mode='binary')
|
||||
qr.png(path, scale=7)
|
||||
|
@ -1621,14 +1620,18 @@ def _timbre(doc, version, values):
|
|||
node = doc.find('{}Complemento/{}TimbreFiscalDigital'.format(
|
||||
PRE[version], PRE['TIMBRE']))
|
||||
data = CaseInsensitiveDict(node.attrib.copy())
|
||||
total_s = '%017.06f' % float(values['total'])
|
||||
qr_data = '?re=%s&rr=%s&tt=%s&id=%s' % (
|
||||
values['rfc_emisor'],
|
||||
values['rfc_receptor'],
|
||||
total_s,
|
||||
node.attrib['UUID'])
|
||||
|
||||
qr_data = {
|
||||
'url': 'https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx?',
|
||||
'uuid': '&id={}'.format(data['uuid']),
|
||||
'emisor': '&re={}'.format(values['rfc_emisor']),
|
||||
'receptor': '&rr={}'.format(values['rfc_receptor']),
|
||||
'total': '&tt={}'.format(values['total']),
|
||||
'sello': '&fe={}'.format(data['sellocfd'][-8:]),
|
||||
}
|
||||
qr_data = '{url}{uuid}{emisor}{receptor}{total}{sello}'.format(**qr_data)
|
||||
data['path_cbb'] = get_qr(qr_data)
|
||||
data['cadenaoriginal'] = CADENA.format(**node.attrib)
|
||||
data['cadenaoriginal'] = CADENA.format(**data)
|
||||
return data
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue