From 4a38410e8fb32e45b457039f59e1ad1627ffdca2 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Fri, 22 Feb 2019 12:24:52 -0600 Subject: [PATCH 1/4] =?UTF-8?q?Validaci=C3=B3n=20para=20que=20ISR=20sea=20?= =?UTF-8?q?de=20solo=20retenci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/static/js/controller/admin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/static/js/controller/admin.js b/source/static/js/controller/admin.js index e577f4d..cbc3392 100644 --- a/source/static/js/controller/admin.js +++ b/source/static/js/controller/admin.js @@ -1640,6 +1640,12 @@ function cmd_agregar_impuesto_click(){ return } + if(impuesto='ISR' || tasa > 0){ + msg = 'El impuesto ISR debe ser tipo Retención' + msg_error(msg) + return + } + msg = 'Datos correctos.

¿Estás seguro de agregar este impuesto?' webix.confirm({ title: 'Agregar impuesto', From 49f1c24df55215dc7848afc2a43e027b61e6dbe6 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Mon, 25 Feb 2019 13:14:52 -0600 Subject: [PATCH 2/4] Mezclar gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index dd92c9f..3b45768 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,12 @@ docs/bk/ source/docs/ site/ vedev/ + +# Virtualenv +.env/ +virtual/ + +docs/ cache/ credenciales.conf *.sqlite From 27a29d331cd3c281a0c0368583d44cd3dbc05f49 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Sun, 3 Mar 2019 23:01:31 -0600 Subject: [PATCH 3/4] Delete files in render PDF --- source/app/controllers/util.py | 9 ++++++++- source/app/models/main.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index f4c2e2b..e13da50 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1666,12 +1666,19 @@ def to_pdf_from_json(rfc, version, data): if exists(path_logo): data['emisor']['logo2'] = path_logo + path_cbb = data['timbre']['path_cbb'] path = get_path_temp() + pdf = TemplateInvoice(path) pdf.custom_styles = custom_styles pdf.data = data pdf.render() - return read_file(path) + + data = read_file(path) + _kill(path) + _kill(path_cbb) + + return data def format_currency(value, currency, digits=2): diff --git a/source/app/models/main.py b/source/app/models/main.py index 95dd6db..8b74860 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -9913,6 +9913,7 @@ def _exportar_documentos(): Facturas.get_pdf(row['id'], rfc, True) msg = '\tPDF generado...' log.info(msg) + log.info('Documentos exportados...') return From aad48639ee9a2c6051d8d0b51e6456ee84cc2200 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Mon, 4 Mar 2019 19:22:28 -0600 Subject: [PATCH 4/4] Fix - In filter invoice by dates --- CHANGELOG.md | 5 +++++ VERSION | 2 +- source/app/models/main.py | 2 +- source/app/settings.py | 2 +- source/static/js/controller/invoices.js | 7 ++++++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d942214..4af3088 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v 1.28.1 [04-mar-2019] +---------------------- + - Error: Al buscar facturas por fechas + + v 1.28.0 [17-feb-2019] ---------------------- - Mejora: Manejo de empaques para mensajeria diff --git a/VERSION b/VERSION index cfc7307..450a687 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.28.0 +1.28.1 diff --git a/source/app/models/main.py b/source/app/models/main.py index 8b74860..8b2f159 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -3720,7 +3720,7 @@ class Facturas(BaseModel): return data def _get_filters(self, values): - if 'start' in values: + if 'start' in values and 'end' in values: filters = Facturas.fecha.between( utils.parse_date(values['start']), utils.parse_date(values['end'], True) diff --git a/source/app/settings.py b/source/app/settings.py index 74da420..3c774c4 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -47,7 +47,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.28.0' +VERSION = '1.28.1' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION) diff --git a/source/static/js/controller/invoices.js b/source/static/js/controller/invoices.js index 6e8cd2c..47c2982 100644 --- a/source/static/js/controller/invoices.js +++ b/source/static/js/controller/invoices.js @@ -1383,6 +1383,12 @@ function cmd_invoice_cancelar_click(){ function get_filters_invoices(){ var filters = $$('filter_dates').getValue() + + if(filters['start'] && !filters['end']){ + msg = 'No seleccionaste la fecha final' + msg_error(msg) + } + filters['year'] = $$('filter_year').getValue() filters['month'] = $$('filter_month').getValue() filters['client'] = $$('grid_invoices').getFilter('cliente').value @@ -2296,7 +2302,6 @@ function search_by(value){ }; } }); - }