Fix error in nomina
This commit is contained in:
commit
29e02e649d
|
@ -151,7 +151,8 @@ class CFDI(object):
|
|||
return ''
|
||||
|
||||
self._comprobante(datos['comprobante'])
|
||||
self._informacion_global(datos['global'])
|
||||
if 'global' in datos:
|
||||
self._informacion_global(datos['global'])
|
||||
self._relacionados(datos['relacionados'])
|
||||
self._emisor(datos['emisor'])
|
||||
self._receptor(datos['receptor'])
|
||||
|
|
|
@ -542,13 +542,14 @@ class AppDocumentos(object):
|
|||
self._db = db
|
||||
|
||||
def on_get(self, req, resp, type_doc, id_doc):
|
||||
# ~ print('TD', type_doc)
|
||||
session = req.env['beaker.session']
|
||||
req.context['result'], file_name, content_type = \
|
||||
self._db.get_doc(type_doc, id_doc, session['rfc'])
|
||||
if not type_doc in ('pdf', 'pre', 'tpdf', 'pdfpago', 'html'):
|
||||
if not type_doc in ('pdf', 'pre', 'tpdf', 'pdfpago', 'html', 'nompdf'):
|
||||
resp.append_header('Content-Disposition',
|
||||
'attachment; filename={}'.format(file_name))
|
||||
if type_doc in ('pdf',):
|
||||
if type_doc in ('pdf', 'nompdf'):
|
||||
resp.append_header('Content-Disposition',
|
||||
'inline; filename={}'.format(file_name))
|
||||
resp.content_type = content_type
|
||||
|
|
|
@ -157,6 +157,7 @@ PRE = {
|
|||
'LOCALES': '{http://www.sat.gob.mx/implocal}',
|
||||
'NOMINA': {
|
||||
'1.1': '{http://www.sat.gob.mx/nomina}',
|
||||
'1.2': '{http://www.sat.gob.mx/nomina12}',
|
||||
},
|
||||
'PAGOS': {
|
||||
'1.0': '{http://www.sat.gob.mx/Pagos}',
|
||||
|
|
Loading…
Reference in New Issue