From ac28ab43f8851be787e2c694c056b55c0903f047 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Wed, 27 Dec 2017 21:19:07 -0600 Subject: [PATCH] Fix - al mostgrar las empresass --- source/app/controllers/main.py | 1 + source/app/controllers/util.py | 7 ++++++- source/static/js/ui/empresas.js | 2 +- source/static/js/ui/tickets.js | 26 +++++++++++++++----------- source/templates/empresas.html | 1 - 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/source/app/controllers/main.py b/source/app/controllers/main.py index d863ba9..9674e17 100644 --- a/source/app/controllers/main.py +++ b/source/app/controllers/main.py @@ -13,6 +13,7 @@ class AppEmpresas(object): @falcon.after(get_template) def on_get(self, req, resp): values = req.params + print ('V', values) resp.status = falcon.HTTP_200 def on_post(self, req, resp): diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index f67b6f0..097a546 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1690,6 +1690,7 @@ class ImportFacturaLibreGambas(object): new = {t: row[s] for s, t in fields} new['notas'] = '' + new['fecha'] = new['fecha'].replace(microsecond=0) new['estatus'] = 'Generado' if new['cancelado']: new['estatus'] = 'Cancelado' @@ -1970,7 +1971,11 @@ class ImportFacturaLibreGambas(object): for _, f in fields: new[f] = new[f] or '' - if not new['fecha_timbrado']: + + new['fecha'] = new['fecha'].replace(microsecond=0) + if new['fecha_timbrado']: + new['fecha_timbrado'] = new['fecha_timbrado'].replace(microsecond=0) + else: new['fecha_timbrado'] = None new['estatus'] = 'Timbrada' diff --git a/source/static/js/ui/empresas.js b/source/static/js/ui/empresas.js index 2991cff..41fe907 100644 --- a/source/static/js/ui/empresas.js +++ b/source/static/js/ui/empresas.js @@ -21,7 +21,7 @@ var header = [ var grid_empresas_cols = [ {id: 'delete', header: '', width: 30, css: 'delete'}, {id: 'rfc', header: 'RFC Emisor', fillspace: true, - footer: {content: 'rowCount', css: 'right'}}, + footer: {content: 'countRows', css: 'right'}}, ] diff --git a/source/static/js/ui/tickets.js b/source/static/js/ui/tickets.js index 609a847..a791f6f 100644 --- a/source/static/js/ui/tickets.js +++ b/source/static/js/ui/tickets.js @@ -196,8 +196,10 @@ var controls_generate_ticket = [ var toolbar_ticket_invoice = {view: 'toolbar', elements: [{}, {view: 'checkbox', id: 'chk_is_invoice_day', labelWidth: 0, width: 150, - labelRight: 'Es factura del día'}, -{}]} + labelRight: 'Es factura del día'}, {}, + {view: 'button', id: 'cmd_close_ticket_invoice', label: 'Cerrar', + type: 'danger', autowidth: true, align: 'center'} +]} var ticket_suggest_partners = { @@ -330,7 +332,9 @@ var controls_ticket_to_invoice = [ {view: 'button', id: 'cmd_move_tickets_right', label: '->', autowidth: true}, {view: 'button', id: 'cmd_move_tickets_left', label: '<-', autowidth: true}, {}]}, - {rows: [{view: 'label', label: 'Tickets a facturar', height: 30, align: 'left'}, grid_tickets_invoice]}, + {rows: [{view: 'label', label: 'Tickets a facturar', height: 30, + align: 'left'}, + grid_tickets_invoice]}, ]}, {minHeight: 20, maxHeight: 20}, {margin: 20, cols: [{}, @@ -338,14 +342,14 @@ var controls_ticket_to_invoice = [ icon: 'ticket', type: 'iconButton', autowidth: true, align: 'center'}, {}] }, - {rows: [ - {template: '', type: 'section'}, - {margin: 10, cols: [{}, - {view: 'button', id: 'cmd_close_ticket_invoice', label: 'Cerrar', - type: 'danger', autowidth: true, align: 'center'} - ] - }, - ]} + //~ {rows: [ + //~ {template: '', type: 'section'}, + //~ {margin: 10, cols: [{}, + //~ {view: 'button', id: 'cmd_close_ticket_invoice', label: 'Cerrar', + //~ type: 'danger', autowidth: true, align: 'center'} + //~ ] + //~ }, + //~ ]} ] diff --git a/source/templates/empresas.html b/source/templates/empresas.html index ed681d1..baa03f2 100644 --- a/source/templates/empresas.html +++ b/source/templates/empresas.html @@ -11,7 +11,6 @@