mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/comercial_id' into 'main'
Expuestos campos ID y PrecioTonelada en visualizacion de papeles de impresion See merge request jjimenez/safekat!790
This commit is contained in:
@ -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();
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
<table id="tableOfPapelesimpresion" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('PapelImpresion.id') ?></th>
|
||||
<th><?= lang('PapelImpresion.nombre') ?></th>
|
||||
<th><?= lang('PapelGenerico.papelGenerico') ?></th>
|
||||
<th><?= lang('PapelImpresion.gramaje') ?></th>
|
||||
@ -32,6 +33,7 @@
|
||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||
<th><?= lang('PapelImpresion.useInClient') ?></th>
|
||||
<th><?= lang('PapelImpresion.precioTonelada') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -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) => `<span class="autonumeric">${d}</span>`},
|
||||
@ -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' ? '<i class="ti ti-check"></i>' : '';
|
||||
|
||||
Reference in New Issue
Block a user