Merge branch 'develop'

Mejora al generar factura en lote
This commit is contained in:
Mauricio Baeza 2018-10-27 01:15:42 -05:00
commit 0bddc189b4
6 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,8 @@
v 1.22.0 [25-oct-2018]
----------------------
- Mejora: Permitir cambiar descripción al facturar en lote
v 1.21.2 [23-oct-2018]
----------------------
- Error unicode

View File

@ -1 +1 @@
1.21.2
1.22.0

View File

@ -6,6 +6,10 @@ siempre actualizado.** Solo se da soporte sobre la ultima versión de **Empresa
Libre**.
### 1.22.0 [25-oct-2018]
- Mejora: Permitir cambiar descripción al facturar en lote
### 1.21.2 [23-oct-2018]
- Error unicode

View File

@ -287,7 +287,7 @@ class SendMail(object):
if '535' in str(e):
self._error = 'Nombre de usuario o contraseña inválidos'
return False
print (e)
# ~ print (e)
if '534' in str(e) and 'gmail' in self._config['servidor']:
self._error = 'Necesitas activar el acceso a otras ' \
'aplicaciones en tu cuenta de GMail'
@ -1054,4 +1054,4 @@ class PrintTicket(object):
self._t(self.LEYENDA)
self._set('center', 'A', 'B')
self._t('empresalibre.net')
return
return

View File

@ -159,8 +159,12 @@ def import_invoice():
return {'ok': False, 'msg': msg}
products = []
for row in rows:
for i, row in enumerate(rows):
try:
if not isinstance(row[0], str):
msg = 'Fila: {} - La clave debe ser TEXTO'.format(i+1)
return {'ok': False, 'msg': msg}
obj = Productos.get(Productos.clave==row[0])
vu = round(row[2], 2)
@ -170,13 +174,14 @@ def import_invoice():
descuento = round(row[3], 2)
cant = round(row[4], 2)
description = row[1].strip()
pedimento = row[5].strip()
pf = vu - descuento
p = {
'id_product': obj.id,
'delete': '-',
'clave': obj.clave,
'descripcion': obj.descripcion,
'descripcion': description,
'pedimento': pedimento,
'unidad': obj.unidad.id,
'cantidad': cant,

View File

@ -47,7 +47,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '1.21.2'
VERSION = '1.22.0'
EMAIL_SUPPORT = ('soporte@empresalibre.net',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)