diff --git a/CHANGELOG.md b/CHANGELOG.md index 386832d..ab53a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/VERSION b/VERSION index 0369d0b..57807d6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.21.2 +1.22.0 diff --git a/docs/empresalibre/docs/notas.md b/docs/empresalibre/docs/notas.md index 248a62e..fd6c6f9 100644 --- a/docs/empresalibre/docs/notas.md +++ b/docs/empresalibre/docs/notas.md @@ -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 diff --git a/source/app/models/main.py b/source/app/models/main.py index e384dec..df6903e 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -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, diff --git a/source/app/settings.py b/source/app/settings.py index 2488489..9e9547f 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -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)