mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
se añade la opción de guardas al papel impresion
This commit is contained in:
@ -196,12 +196,15 @@ class Papelesimpresion extends \App\Controllers\GoBaseResourceController
|
||||
if ($this->request->getPost('color') == null) {
|
||||
$sanitizedData['color'] = false;
|
||||
}
|
||||
if ($this->request->getPost('portada') == null) {
|
||||
$sanitizedData['portada'] = false;
|
||||
}
|
||||
if ($this->request->getPost('cubierta') == null) {
|
||||
$sanitizedData['cubierta'] = false;
|
||||
}
|
||||
if ($this->request->getPost('sobrecubierta') == null) {
|
||||
$sanitizedData['sobrecubierta'] = false;
|
||||
}
|
||||
if ($this->request->getPost('guardas') == null) {
|
||||
$sanitizedData['guardas'] = false;
|
||||
}
|
||||
if ($this->request->getPost('rotativa') == null) {
|
||||
$sanitizedData['rotativa'] = false;
|
||||
}
|
||||
|
||||
@ -676,6 +676,13 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
'rotativa' => 0,
|
||||
);
|
||||
}
|
||||
else if ( $uso == 'guardas' ){
|
||||
$opciones_papel = array(
|
||||
'guardas' => 1,
|
||||
//'color' => 1,
|
||||
'rotativa' => 0,
|
||||
);
|
||||
}
|
||||
else if( $isColor ){
|
||||
$opciones_papel = array(
|
||||
'color' => 1,
|
||||
|
||||
@ -19,6 +19,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"color" => true,
|
||||
"cubierta" => false,
|
||||
"sobrecubierta" => false,
|
||||
"guardas" => false,
|
||||
"inkjet" => false,
|
||||
"rotativa" => false,
|
||||
"is_deleted" => 0,
|
||||
@ -36,6 +37,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"color" => "boolean",
|
||||
"cubierta" => "boolean",
|
||||
"sobrecubierta" => "boolean",
|
||||
"guardas" => "boolean",
|
||||
"rotativa" => "boolean",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
|
||||
@ -10,6 +10,7 @@ return [
|
||||
'createdAt' => 'Creado en',
|
||||
'cubierta' => 'Cubierta',
|
||||
'sobrecubierta' => 'Sobrecubierta',
|
||||
'guardas' => 'Guardas',
|
||||
'defecto' => 'Por defecto',
|
||||
'deletedAt' => 'Borrado en',
|
||||
'espesor' => 'Espesor',
|
||||
|
||||
@ -20,9 +20,10 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
4 => "t1.color",
|
||||
5 => "t1.cubierta",
|
||||
6 => "t1.sobrecubierta",
|
||||
7 => "t1.inkjet",
|
||||
8 => "t1.rotativa",
|
||||
9 => "t1.isActivo"
|
||||
7 => "t1.guardas",
|
||||
8 => "t1.inkjet",
|
||||
9 => "t1.rotativa",
|
||||
10 => "t1.isActivo"
|
||||
];
|
||||
|
||||
|
||||
@ -39,6 +40,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
"color",
|
||||
"cubierta",
|
||||
"sobrecubierta",
|
||||
"guardas",
|
||||
"inkjet",
|
||||
"rotativa",
|
||||
"isActivo",
|
||||
@ -146,7 +148,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
->select(
|
||||
"t1.id AS id, t1.nombre AS nombre, t1.defecto AS defecto, t1.referencia AS referencia, t1.mano AS mano,
|
||||
t1.espesor AS espesor, t1.gramaje AS gramaje, t1.precio_tonelada AS precio_tonelada,
|
||||
t1.bn AS bn, t1.color AS color, t1.cubierta AS cubierta, t1.sobrecubierta AS sobrecubierta,
|
||||
t1.bn AS bn, t1.color AS color, t1.cubierta AS cubierta, t1.sobrecubierta AS sobrecubierta, t1.guardas AS guardas,
|
||||
t1.inkjet AS inkjet, t1.rotativa AS rotativa,
|
||||
t1.isActivo AS isActivo, t2.nombre AS papel_generico_id"
|
||||
);
|
||||
@ -227,6 +229,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
$color = array_key_exists('color', $options)? $options['color'] : null;
|
||||
$cubierta = array_key_exists('cubierta', $options)? $options['cubierta'] : null;
|
||||
$sobrecubierta = array_key_exists('sobrecubierta', $options)? $options['sobrecubierta'] : null;
|
||||
$guardas = array_key_exists('guardas', $options)? $options['guardas'] : null;
|
||||
$rotativa = array_key_exists('rotativa', $options)? $options['rotativa'] : null;
|
||||
|
||||
$builder = $this->db
|
||||
@ -254,6 +257,9 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
if(!is_null($sobrecubierta)){
|
||||
$builder->where("t1.sobrecubierta", $sobrecubierta);
|
||||
}
|
||||
if(!is_null($guardas)){
|
||||
$builder->where("t1.guardas", $guardas);
|
||||
}
|
||||
if(!is_null($rotativa)){
|
||||
$builder->where("t1.rotativa", $rotativa);
|
||||
}
|
||||
|
||||
@ -90,6 +90,16 @@
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="guardas" class="form-check-label">
|
||||
<input type="checkbox" id="guardas" name="guardas" value="1" class="form-check-input" <?= $papelImpresion->guardas == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.guardas') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
<th><?= lang('PapelImpresion.color') ?></th>
|
||||
<th><?= lang('PapelImpresion.cubierta') ?></th>
|
||||
<th><?= lang('PapelImpresion.sobrecubierta') ?></th>
|
||||
<th><?= lang('PapelImpresion.guardas') ?></th>
|
||||
<th><?= lang('PapelImpresion.inkjet') ?></th>
|
||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||
@ -101,6 +102,7 @@
|
||||
{ 'data': 'color' },
|
||||
{ 'data': 'cubierta' },
|
||||
{ 'data': 'sobrecubierta' },
|
||||
{ 'data': 'guardas' },
|
||||
{ 'data': 'inkjet' },
|
||||
{ 'data': 'rotativa' },
|
||||
{ 'data': 'isActivo' },
|
||||
@ -110,7 +112,7 @@
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
const boolCols = [3, 4, 5, 6, 7, 8, 9];
|
||||
const boolCols = [3, 4, 5, 6, 7, 8, 9, 10];
|
||||
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