From 2d045af0372a117449247e4ec6a0373e94f35a2d Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Wed, 7 Nov 2018 19:14:54 -0600 Subject: [PATCH] =?UTF-8?q?Error=20al=20importar=20n=C3=B3mina=20y=20factu?= =?UTF-8?q?ra=20en=20lote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- source/app/controllers/util.py | 1 + source/app/models/main.py | 6 ++++-- source/app/settings.py | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcd5aa..a71e4f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +v 1.25.0 [07-nov-2018] +---------------------- + - Fix: Al importar días de pago en nómina + - Fix: Al importar descripción en factura en lote + + v 1.24.0 [06-nov-2018] ---------------------- - Fix: Consulta estatus SAT diff --git a/VERSION b/VERSION index 53cc1a6..ad21919 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.0 +1.25.0 diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 146128f..5338e94 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1399,6 +1399,7 @@ class LIBO(object): 'fecha_inicial_pago', 'fecha_final_pago', 'relacionados', + 'dias_pagados', ) data = tuple([dict(zip(fields, r[1:])) for r in rows[2:]]) return data, '' diff --git a/source/app/models/main.py b/source/app/models/main.py index b190ea9..71eb26f 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -181,7 +181,7 @@ def import_invoice(): 'id_product': obj.id, 'delete': '-', 'clave': obj.clave, - 'descripcion': description, + 'descripcion': description or obj.descripcion, 'pedimento': pedimento, 'unidad': obj.unidad.id, 'cantidad': cant, @@ -7217,6 +7217,7 @@ class CfdiNomina(BaseModel): sn = {'si': True, 'no': False} data = row.copy() rfc = data.pop('rfc') + days_pay = data.pop('dias_pagados') try: data['empleado'] = Empleados.get(Empleados.rfc==rfc) except Empleados.DoesNotExist: @@ -7241,7 +7242,8 @@ class CfdiNomina(BaseModel): data['fecha_pago'] = util.calc_to_date(row['fecha_pago']) data['fecha_inicial_pago'] = util.calc_to_date(row['fecha_inicial_pago']) data['fecha_final_pago'] = util.calc_to_date(row['fecha_final_pago']) - data['dias_pagados'] = util.get_days(data['fecha_inicial_pago'], data['fecha_final_pago']) + # ~ data['dias_pagados'] = util.get_days(data['fecha_inicial_pago'], data['fecha_final_pago']) + data['dias_pagados'] = days_pay return data, '' diff --git a/source/app/settings.py b/source/app/settings.py index 0a189e7..df4130f 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -47,7 +47,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.24.0' +VERSION = '1.25.0' EMAIL_SUPPORT = ('soporte@empresalibre.net',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)