From a04f92fab876dda51a98a97d620061c45121d417 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Thu, 5 Jul 2018 23:52:09 -0500 Subject: [PATCH] Fix - Ticket #230 --- source/static/js/controller/invoices.js | 34 ++++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/source/static/js/controller/invoices.js b/source/static/js/controller/invoices.js index 0b9c0a2..e9583ef 100644 --- a/source/static/js/controller/invoices.js +++ b/source/static/js/controller/invoices.js @@ -2010,21 +2010,37 @@ function cmd_invoice_save_note_click(){ function cmd_invoice_report_pdf_click(){ + var d = new Date() + var ds = d.toISOString().slice(0,10).replace(/-/g, "_") + webix.toPDF($$('grid_invoices'), { ignore: {'xml': true, 'pdf': true, 'zip': true, 'mail': true}, - filename: 'Reporte_de_Facturas', + filename: 'Reporte_de_Facturas_' + ds, width: 612, height: 792, - autowidth: true, + //~ autowidth: true, + filterHTML: true, + fontSize: 8, + padding: 5, + header:{ + textAlign: 'center', + fontSize: 9, + }, + table:{ + fontSize: 8, + }, + row:{ + padding: 0, + }, columns:{ index: true, - serie: {width: 50}, - folio: {width: 50}, - fecha: {width: 125}, - tipo_comprobante: {width: 25}, - estatus: true, - total_mn: {css: 'right'}, - cliente: true, + serie: {width: 40}, + folio: {width: 30}, + fecha: {width: 95}, + tipo_comprobante: {width: 20}, + estatus: {width: 50}, + total_mn: {width: 70}, + cliente: {width: 200}, } }) }