From 4d9bc4a172167a2ceda98794805cb07b50165c03 Mon Sep 17 00:00:00 2001 From: El Mau Date: Wed, 20 Dec 2023 18:36:44 -0600 Subject: [PATCH 1/3] 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) From 26201594085af190b15fcb44263c3d3f9148bd6e Mon Sep 17 00:00:00 2001 From: El Mau Date: Wed, 20 Dec 2023 18:51:38 -0600 Subject: [PATCH 2/3] Fix issue #98 --- source/static/js/controller/invoices.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/static/js/controller/invoices.js b/source/static/js/controller/invoices.js index 3cd16b4..e1b235a 100644 --- a/source/static/js/controller/invoices.js +++ b/source/static/js/controller/invoices.js @@ -434,6 +434,14 @@ function validate_invoice(values){ return false } + var metodo_pago = $$('lst_metodo_pago').getValue() + if(metodo_pago=='PPD' && forma_pago!='99'){ + webix.UIManager.setFocus('lst_forma_pago') + msg = 'La Forma de pago debe ser: [99] Por definir' + msg_error(msg) + return false + } + var tipo_cambio = $$('txt_tipo_cambio').getValue() if(tipo_cambio.trim() == ""){ webix.UIManager.setFocus('txt_tipo_cambio') @@ -466,8 +474,8 @@ function validate_invoice(values){ anticipo = $$('chk_cfdi_anticipo').getValue() if(anticipo){ - var mp = $$('lst_metodo_pago').getValue() - if(mp != 'PUE'){ + //~ var mp = $$('lst_metodo_pago').getValue() + if(metodo_pago != 'PUE'){ msg = 'En anticipos, el método de pago debe ser: Pago en una sola exhibición' msg_error(msg) return false @@ -548,7 +556,7 @@ function validate_invoice(values){ if(is_global){ var key_sat = rows[i]['clave_sat'] if(key_sat!=KEY_SAT_01){ - var msg = 'Clave SAT inválida para Facturar Global en la línea: ' + (i + 1) + var msg = 'Clave SAT inválida para Factura Global en la línea: ' + (i + 1) msg_error(msg) return false } From 070ee31a1b3f32ebbc9fe4cc4511e5ff20a063c2 Mon Sep 17 00:00:00 2001 From: El Mau Date: Wed, 20 Dec 2023 18:54:25 -0600 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 225673e..ffa0506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ v 2.0.9 [20-Dic-2023] - - Fix: Issue 107 + - Fix: Issue 98 y 107 v 2.0.8 [30-Oct-2023]