diff --git a/source/app/empresalibre.service.example b/source/app/empresalibre.service.example index facb5a0..5ee4bdc 100644 --- a/source/app/empresalibre.service.example +++ b/source/app/empresalibre.service.example @@ -3,6 +3,7 @@ Description=uWSGI instance to serve Empresa Libre [Service] ExecStart=/usr/bin/uwsgi /opt/empresa-libre/app/main.ini +KillSignal=SIGQUIT [Install] WantedBy=multi-user.target diff --git a/source/app/models/main.py b/source/app/models/main.py index a1b5c72..c0794e8 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -2750,6 +2750,7 @@ class Productos(BaseModel): .dicts() ) if len(row): + print(row[0]) id = row[0]['id_product'] model_pt = Productos.impuestos.get_through_model() taxes = tuple(model_pt @@ -4979,7 +4980,7 @@ class Tickets(BaseModel): total_trasladados = None for producto in productos: - id_producto = producto.pop('id') + id_producto = producto.pop('id_product') p = Productos.get(Productos.id==id_producto) producto['descripcion'] = p.descripcion producto['ticket'] = ticket.id diff --git a/source/static/js/controller/tickets.js b/source/static/js/controller/tickets.js index 950b1b8..6c228f2 100644 --- a/source/static/js/controller/tickets.js +++ b/source/static/js/controller/tickets.js @@ -221,6 +221,7 @@ function guardar_ticket(values){ var rows = gd.data.getRange() for (i = 0; i < rows.length; i++) { + delete rows[i]['id'] delete rows[i]['delete'] delete rows[i]['clave'] delete rows[i]['clave_sat'] diff --git a/source/static/js/ui/admin.js b/source/static/js/ui/admin.js index e06351d..3998886 100644 --- a/source/static/js/ui/admin.js +++ b/source/static/js/ui/admin.js @@ -560,6 +560,11 @@ var options_templates = [ label: 'Plantilla Factura v3.3 (JSON): ', labelPosition: 'top', icon: 'file'}, {}]}, {maxHeight: 20}, + {cols: [{maxWidth: 15}, + {view: 'search', id: 'txt_plantilla_nomina1233', name: 'plantilla_nomina1233', + label: 'Plantilla Nomina v1.2 - Cfdi 3.3 (ODS): ', labelPosition: 'top', + icon: 'file'}, {}]}, + {maxHeight: 20}, {cols: [{maxWidth: 15}, {view: 'search', id: 'txt_plantilla_ticket', name: 'plantilla_ticket', label: 'Plantilla para Tickets (ODS): ', labelPosition: 'top', @@ -569,11 +574,6 @@ var options_templates = [ icon: 'file'}, {}]}, {maxHeight: 20}, - {cols: [{maxWidth: 15}, - {view: 'search', id: 'txt_plantilla_nomina1233', name: 'plantilla_nomina1233', - label: 'Plantilla Nomina v1.2 - Cfdi 3.3 (ODS): ', labelPosition: 'top', - icon: 'file'}, {}]}, - {maxHeight: 20}, {}] diff --git a/source/static/js/ui/tickets.js b/source/static/js/ui/tickets.js index 235aa3d..9e51627 100644 --- a/source/static/js/ui/tickets.js +++ b/source/static/js/ui/tickets.js @@ -123,14 +123,15 @@ var tbody_buscar_producto = {rows: [ var grid_tdetails_cols = [ - {id: "id", header:"ID", hidden: true}, + {id: "id_product", header:"ID", hidden: true}, {id: 'delete', header: '', width: 30, css: 'delete'}, {id: "clave", header:{text: 'Clave', css: 'center'}, width: 100, footer: {text: 'Artículos', css: 'right_footer3'}}, {id: "clave_sat", hidden: true}, {id: "descripcion", header:{text: 'Descripción', css: 'center'}, fillspace: true, footer: {content: 'countRows', css: 'footer3'}}, - {id: "unidad", header:{text: 'Unidad', css: 'center'}, width: 100}, + {id: "unidad", header:{text: 'Unidad', css: 'center'}, width: 100, + editor: 'select', options: 'values/unidades'}, {id: 'cantidad', header: {text: 'Cantidad', css: 'center'}, width: 100, format: webix.i18n.numberFormat, css: 'right', editor: 'text', footer: {content: 'summColumn', css: 'right_footer3'}},