Fix - Fecha vacia al importar
This commit is contained in:
parent
8048a07852
commit
b48d6bd1f5
|
@ -254,6 +254,7 @@ class SendMail(object):
|
|||
return self._error
|
||||
|
||||
def _login(self):
|
||||
servers_ssl = ('smtp.gmail.com', '')
|
||||
try:
|
||||
if self._config['ssl'] and 'gmail' in self._config['servidor']:
|
||||
self._server = smtplib.SMTP(
|
||||
|
|
|
@ -42,6 +42,7 @@ class AppLogin(object):
|
|||
|
||||
def on_post(self, req, resp):
|
||||
session = req.env['beaker.session']
|
||||
session.invalidate()
|
||||
values = req.params
|
||||
values['rfc'] = values['rfc'].upper()
|
||||
result, user = self._db.authenticate(values)
|
||||
|
|
|
@ -2472,8 +2472,12 @@ class ImportFacturaLibre(object):
|
|||
new['xml'] = ''
|
||||
if row['estatus'] == 'Pagada':
|
||||
new['pagada'] = True
|
||||
elif row['estatus'] == 'Cancelada':
|
||||
elif row['estatus'] in ('Cancelada', 'Validada'):
|
||||
new['cancelada'] = True
|
||||
|
||||
if new['fecha'] is None:
|
||||
new['fecha'] = str(now())
|
||||
|
||||
new['total_mn'] = round(row['TipoCambio'] * row['total'], 2)
|
||||
new['detalles'] = self._get_detalles(row['id'])
|
||||
new['impuestos'] = self._get_impuestos(row['id'])
|
||||
|
|
|
@ -36,6 +36,7 @@ class AuthMiddleware(object):
|
|||
session = req.env['beaker.session']
|
||||
user = session.get('userobj', None)
|
||||
id_session = req.cookies.get('beaker.session.id', '')
|
||||
# ~ print ('\n\n', id_session, session, '\n\n')
|
||||
if req.path == '/empresas' or req.path == '/values/empresas':
|
||||
if MV:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue