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;
|
protected $useAutoIncrement = true;
|
||||||
|
|
||||||
const SORTABLE = [
|
const SORTABLE = [
|
||||||
0 => "t1.nombre",
|
0 => "t1.id",
|
||||||
1 => "t2.nombre",
|
1 => "t1.nombre",
|
||||||
2 => "t1.gramaje",
|
2 => "t2.nombre",
|
||||||
3 => "t1.interior",
|
3 => "t1.gramaje",
|
||||||
4 => "t1.bn",
|
4 => "t1.interior",
|
||||||
5 => "t1.color",
|
5 => "t1.bn",
|
||||||
6 => "t1.cubierta",
|
6 => "t1.color",
|
||||||
7 => "t1.use_for_tapa_dura",
|
7 => "t1.cubierta",
|
||||||
8 => "t1.sobrecubierta",
|
8 => "t1.use_for_tapa_dura",
|
||||||
9 => "t1.guardas",
|
9 => "t1.sobrecubierta",
|
||||||
10 => "t1.inkjet",
|
10 => "t1.guardas",
|
||||||
11 => "t1.rotativa",
|
11 => "t1.inkjet",
|
||||||
12 => "t1.isActivo",
|
12 => "t1.rotativa",
|
||||||
13 => "t1.use_in_client",
|
13 => "t1.isActivo",
|
||||||
|
14 => "t1.use_in_client",
|
||||||
|
15 => "t1.precio_tonelada",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +175,7 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
|||||||
->groupStart()
|
->groupStart()
|
||||||
->like("t1.nombre", $search)
|
->like("t1.nombre", $search)
|
||||||
->orLike("t1.gramaje", $search)
|
->orLike("t1.gramaje", $search)
|
||||||
->orLike("t1.nombre", $search)
|
->orLike("t1.precio_tonelada", $search)
|
||||||
->orLike("t1.gramaje", $search)
|
->orLike("t1.gramaje", $search)
|
||||||
->orLike("t2.nombre", $search)
|
->orLike("t2.nombre", $search)
|
||||||
->groupEnd();
|
->groupEnd();
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
<table id="tableOfPapelesimpresion" class="table table-striped table-hover" style="width: 100%;">
|
<table id="tableOfPapelesimpresion" class="table table-striped table-hover" style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th><?= lang('PapelImpresion.id') ?></th>
|
||||||
<th><?= lang('PapelImpresion.nombre') ?></th>
|
<th><?= lang('PapelImpresion.nombre') ?></th>
|
||||||
<th><?= lang('PapelGenerico.papelGenerico') ?></th>
|
<th><?= lang('PapelGenerico.papelGenerico') ?></th>
|
||||||
<th><?= lang('PapelImpresion.gramaje') ?></th>
|
<th><?= lang('PapelImpresion.gramaje') ?></th>
|
||||||
@ -32,6 +33,7 @@
|
|||||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||||
<th><?= lang('PapelImpresion.useInClient') ?></th>
|
<th><?= lang('PapelImpresion.useInClient') ?></th>
|
||||||
|
<th><?= lang('PapelImpresion.precioTonelada') ?></th>
|
||||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -80,7 +82,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
order: [[1, 'asc']],
|
order: [[2, 'asc']],
|
||||||
language: {
|
language: {
|
||||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||||
},
|
},
|
||||||
@ -98,6 +100,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
columns : [
|
columns : [
|
||||||
|
{ 'data': 'id' },
|
||||||
{ 'data': 'nombre' },
|
{ 'data': 'nombre' },
|
||||||
{ 'data': 'papel_generico_id' },
|
{ 'data': 'papel_generico_id' },
|
||||||
{ 'data': 'gramaje', render : (d) => `<span class="autonumeric">${d}</span>`},
|
{ 'data': 'gramaje', render : (d) => `<span class="autonumeric">${d}</span>`},
|
||||||
@ -112,13 +115,14 @@
|
|||||||
{ 'data': 'rotativa' },
|
{ 'data': 'rotativa' },
|
||||||
{ 'data': 'isActivo' },
|
{ 'data': 'isActivo' },
|
||||||
{ 'data': 'use_in_client' },
|
{ 'data': 'use_in_client' },
|
||||||
|
{ 'data': 'precio_tonelada' },
|
||||||
{ 'data': actionBtns }
|
{ 'data': actionBtns }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
theTable.on( 'draw.dt', function () {
|
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) {
|
for (let coln of boolCols) {
|
||||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||||
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
|
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user