From f532c79b2730b1c66cda534cb2fe79af531b0af2 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Sun, 9 Feb 2025 00:25:52 +0100 Subject: [PATCH] add format number in datatables --- .../maquinas/viewMaquinaPorDefectoList.php | 12 +- .../papel/viewPapelGenericoForm.php | 2 +- .../papel/viewPapelImpresionForm.php | 22 ++-- .../papel/viewPapelImpresionList.php | 2 +- .../vuexy/form/pedidos/viewPedidosList.php | 16 +-- .../admin/viewPresupuestoAdminList.php | 6 +- .../buscador/viewBuscadorList.php | 11 +- .../cliente/viewPresupuestoList.php | 6 +- .../viewTarifaEncuadernacionForm.php | 108 +++++++++++---- .../tarifas/envios/viewTarifaEnvioForm.php | 123 ++++++++++++++++-- .../tarifas/extra/viewTarifaextraList.php | 9 +- .../manipulado/viewTarifaManipuladoForm.php | 85 ++++++------ .../viewTarifapreimpresionList.php | 8 +- .../Views/themes/vuexy/main/defaultlayout.php | 4 +- httpdocs/assets/js/safekat/common/common.js | 67 +++++++++- httpdocs/assets/js/safekat/pages/layout.js | 4 + .../js/safekat/pages/maquinas/maquinasList.js | 8 +- 17 files changed, 361 insertions(+), 132 deletions(-) create mode 100644 httpdocs/assets/js/safekat/pages/layout.js diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php b/ci4/app/Views/themes/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php index d6d31e0c..5dc87547 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php @@ -107,12 +107,12 @@ } }, { 'data': 'maquina' }, - { 'data': 'ancho_min' }, - { 'data': 'ancho_max' }, - { 'data': 'alto_min' }, - { 'data': 'alto_max' }, - { 'data': 'tirada_min' }, - { 'data': 'tirada_max' }, + { 'data': 'ancho_min',render : (d) => `${d}` }, + { 'data': 'ancho_max',render : (d) => `${d}` }, + { 'data': 'alto_min',render : (d) => `${d}` }, + { 'data': 'alto_max',render : (d) => `${d}` }, + { 'data': 'tirada_min',render : (d) => `${d}` }, + { 'data': 'tirada_max',render : (d) => `${d}` }, { 'data': actionBtns } ] }); diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelGenericoForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelGenericoForm.php index 0d231599..b9b1b815 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelGenericoForm.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelGenericoForm.php @@ -113,7 +113,7 @@ columns : [ { 'data': 'defecto' }, { 'data': 'nombre' }, - { 'data': 'gramaje' }, + { 'data': 'gramaje',render : (d) => `${d}` }, { 'data': actionBtns } ] }); diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionForm.php index 1786fe29..cec4fae0 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionForm.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionForm.php @@ -290,7 +290,9 @@ },{ name: "margen", attr: { - type: "number" + type: "text", + name : "margen", + class :"autonumeric" } }, { "name": "papel_impresion_id", @@ -352,7 +354,7 @@ columns : [ { 'data': 'paginas_min' , render : (d) => `${d}` }, { 'data': 'paginas_max' , render : (d) => `${d}`}, - { 'data': 'margen' }, + { 'data': 'margen', render : (d) => `${d}`}, { data: actionBtns3, className: 'row-edit dt-center'} ], @@ -375,13 +377,7 @@ } ] }); - theTable3.on('draw',() => { - AutoNumeric.multiple("span.autonumeric", { - digitGroupSeparator: ".", - decimalCharacter: ",", - unformatOnSubmit: true - }); - }) + // Activate an inline edit on click of a table cell $(document).on('click', '.btn-edit3', function(e) { editor3.inline( @@ -739,10 +735,10 @@ className: 'dt-body-center' }, { 'data': 'maquina'}, - { 'data': 'ancho'}, - { 'data': 'alto'}, - { 'data': 'anchoimpresion'}, - { 'data': 'altoimpresion'}, + { 'data': 'ancho',render : (d) => `${d}`}, + { 'data': 'alto',render : (d) => `${d}`}, + { 'data': 'anchoimpresion',render : (d) => `${d}`}, + { 'data': 'altoimpresion',render : (d) => `${d}`}, { data: actionBtns2, className: 'row-edit dt-center'} ], diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php index 5dcf2c20..3702621a 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php @@ -100,7 +100,7 @@ columns : [ { 'data': 'nombre' }, { 'data': 'papel_generico_id' }, - { 'data': 'gramaje' }, + { 'data': 'gramaje', render : (d) => `${d}`}, { 'data': 'interior' }, { 'data': 'bn' }, { 'data': 'color' }, diff --git a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php index f582f5aa..1bbb709e 100644 --- a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php +++ b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php @@ -72,10 +72,10 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) { var title = $(this).text(); if($(this).hasClass("totalizador")){ if(i==9){ - $(this).html('