From 4d9bc4a172167a2ceda98794805cb07b50165c03 Mon Sep 17 00:00:00 2001 From: El Mau Date: Wed, 20 Dec 2023 18:36:44 -0600 Subject: [PATCH] Fix issue #107 --- .gitignore | 1 + CHANGELOG.md | 4 ++++ VERSION | 2 +- source/app/controllers/main.py | 2 +- source/app/models/main.py | 12 ++++++++++++ source/app/settings.py | 2 +- 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 76d9c18..bd246b8 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ credenciales.conf *.orig rfc.db Dockerfile +chuletas/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a99f7..225673e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v 2.0.9 [20-Dic-2023] + - Fix: Issue 107 + + v 2.0.8 [30-Oct-2023] --------------------- - Fix: Permitir generar CFDI de egreso para facturas globales sin datos globales. diff --git a/VERSION b/VERSION index 815e68d..09843e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.8 +2.0.9 diff --git a/source/app/controllers/main.py b/source/app/controllers/main.py index d345455..e07f4f1 100644 --- a/source/app/controllers/main.py +++ b/source/app/controllers/main.py @@ -549,7 +549,7 @@ class AppDocumentos(object): 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', 'nompdf'): + if type_doc in ('pdf', 'nompdf', 'pdfpago'): resp.append_header('Content-Disposition', 'inline; filename={}'.format(file_name)) resp.content_type = content_type diff --git a/source/app/models/main.py b/source/app/models/main.py index 40210b2..787d14c 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -9505,6 +9505,18 @@ class CfdiNomina(BaseModel): if msg: return {}, msg + if isinstance(row['fecha_pago'], str): + msg = f"La Fecha de Pago debe ser una fecha: {row['fecha_pago']}" + return {}, msg + + if isinstance(row['fecha_inicial_pago'], str): + msg = f"La Fecha Inicial de Pago debe ser una fecha: {row['fecha_inicial_pago']}" + return {}, msg + + if isinstance(row['fecha_final_pago'], str): + msg = f"La Fecha Final de Pago debe ser una fecha: {row['fecha_final_pago']}" + return {}, msg + data['serie'] = self._get_serie(self) data['folio'] = self._get_folio(self, data['serie']) data['forma_pago'] = DEFAULT_SAT_NOMINA['FORMA_PAGO'] diff --git a/source/app/settings.py b/source/app/settings.py index 77132d6..37cdb15 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -39,7 +39,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '2.0.8' +VERSION = '2.0.9' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)