From d3dd18a156d3140b4840e9498545a57ab85f6e88 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Navajas Date: Tue, 6 May 2025 12:23:00 +0200 Subject: [PATCH] Expuestos campos ID y PrecioTonelada en visualizacion de papeles de impresion --- .../Configuracion/PapelImpresionModel.php | 32 ++++++++++--------- .../papel/viewPapelImpresionList.php | 8 +++-- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ci4/app/Models/Configuracion/PapelImpresionModel.php b/ci4/app/Models/Configuracion/PapelImpresionModel.php index fc03ccae..d816b9c6 100755 --- a/ci4/app/Models/Configuracion/PapelImpresionModel.php +++ b/ci4/app/Models/Configuracion/PapelImpresionModel.php @@ -13,20 +13,22 @@ class PapelImpresionModel extends \App\Models\BaseModel protected $useAutoIncrement = true; const SORTABLE = [ - 0 => "t1.nombre", - 1 => "t2.nombre", - 2 => "t1.gramaje", - 3 => "t1.interior", - 4 => "t1.bn", - 5 => "t1.color", - 6 => "t1.cubierta", - 7 => "t1.use_for_tapa_dura", - 8 => "t1.sobrecubierta", - 9 => "t1.guardas", - 10 => "t1.inkjet", - 11 => "t1.rotativa", - 12 => "t1.isActivo", - 13 => "t1.use_in_client", + 0 => "t1.id", + 1 => "t1.nombre", + 2 => "t2.nombre", + 3 => "t1.gramaje", + 4 => "t1.interior", + 5 => "t1.bn", + 6 => "t1.color", + 7 => "t1.cubierta", + 8 => "t1.use_for_tapa_dura", + 9 => "t1.sobrecubierta", + 10 => "t1.guardas", + 11 => "t1.inkjet", + 12 => "t1.rotativa", + 13 => "t1.isActivo", + 14 => "t1.use_in_client", + 15 => "t1.precio_tonelada", ]; @@ -173,7 +175,7 @@ class PapelImpresionModel extends \App\Models\BaseModel ->groupStart() ->like("t1.nombre", $search) ->orLike("t1.gramaje", $search) - ->orLike("t1.nombre", $search) + ->orLike("t1.precio_tonelada", $search) ->orLike("t1.gramaje", $search) ->orLike("t2.nombre", $search) ->groupEnd(); 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 3702621a..f3f41f75 100755 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php @@ -18,6 +18,7 @@ + @@ -32,6 +33,7 @@ + @@ -80,7 +82,7 @@ } ], stateSave: true, - order: [[1, 'asc']], + order: [[2, 'asc']], language: { url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" }, @@ -98,6 +100,7 @@ } ], columns : [ + { 'data': 'id' }, { 'data': 'nombre' }, { 'data': 'papel_generico_id' }, { 'data': 'gramaje', render : (d) => `${d}`}, @@ -112,13 +115,14 @@ { 'data': 'rotativa' }, { 'data': 'isActivo' }, { 'data': 'use_in_client' }, + { 'data': 'precio_tonelada' }, { 'data': actionBtns } ] }); theTable.on( 'draw.dt', function () { - const boolCols = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; + const boolCols = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]; for (let coln of boolCols) { theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) { cell.innerHTML = cell.innerHTML == '1' ? '' : '';