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) {
|
if ($this->request->getPost('color') == null) {
|
||||||
$sanitizedData['color'] = false;
|
$sanitizedData['color'] = false;
|
||||||
}
|
}
|
||||||
if ($this->request->getPost('portada') == null) {
|
|
||||||
$sanitizedData['portada'] = false;
|
|
||||||
}
|
|
||||||
if ($this->request->getPost('cubierta') == null) {
|
if ($this->request->getPost('cubierta') == null) {
|
||||||
$sanitizedData['cubierta'] = false;
|
$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) {
|
if ($this->request->getPost('rotativa') == null) {
|
||||||
$sanitizedData['rotativa'] = false;
|
$sanitizedData['rotativa'] = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -676,6 +676,13 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
|||||||
'rotativa' => 0,
|
'rotativa' => 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else if ( $uso == 'guardas' ){
|
||||||
|
$opciones_papel = array(
|
||||||
|
'guardas' => 1,
|
||||||
|
//'color' => 1,
|
||||||
|
'rotativa' => 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
else if( $isColor ){
|
else if( $isColor ){
|
||||||
$opciones_papel = array(
|
$opciones_papel = array(
|
||||||
'color' => 1,
|
'color' => 1,
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
|||||||
"color" => true,
|
"color" => true,
|
||||||
"cubierta" => false,
|
"cubierta" => false,
|
||||||
"sobrecubierta" => false,
|
"sobrecubierta" => false,
|
||||||
|
"guardas" => false,
|
||||||
"inkjet" => false,
|
"inkjet" => false,
|
||||||
"rotativa" => false,
|
"rotativa" => false,
|
||||||
"is_deleted" => 0,
|
"is_deleted" => 0,
|
||||||
@ -36,6 +37,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
|||||||
"color" => "boolean",
|
"color" => "boolean",
|
||||||
"cubierta" => "boolean",
|
"cubierta" => "boolean",
|
||||||
"sobrecubierta" => "boolean",
|
"sobrecubierta" => "boolean",
|
||||||
|
"guardas" => "boolean",
|
||||||
"rotativa" => "boolean",
|
"rotativa" => "boolean",
|
||||||
"is_deleted" => "int",
|
"is_deleted" => "int",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -10,6 +10,7 @@ return [
|
|||||||
'createdAt' => 'Creado en',
|
'createdAt' => 'Creado en',
|
||||||
'cubierta' => 'Cubierta',
|
'cubierta' => 'Cubierta',
|
||||||
'sobrecubierta' => 'Sobrecubierta',
|
'sobrecubierta' => 'Sobrecubierta',
|
||||||
|
'guardas' => 'Guardas',
|
||||||
'defecto' => 'Por defecto',
|
'defecto' => 'Por defecto',
|
||||||
'deletedAt' => 'Borrado en',
|
'deletedAt' => 'Borrado en',
|
||||||
'espesor' => 'Espesor',
|
'espesor' => 'Espesor',
|
||||||
|
|||||||
@ -20,9 +20,10 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
|||||||
4 => "t1.color",
|
4 => "t1.color",
|
||||||
5 => "t1.cubierta",
|
5 => "t1.cubierta",
|
||||||
6 => "t1.sobrecubierta",
|
6 => "t1.sobrecubierta",
|
||||||
7 => "t1.inkjet",
|
7 => "t1.guardas",
|
||||||
8 => "t1.rotativa",
|
8 => "t1.inkjet",
|
||||||
9 => "t1.isActivo"
|
9 => "t1.rotativa",
|
||||||
|
10 => "t1.isActivo"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
|||||||
"color",
|
"color",
|
||||||
"cubierta",
|
"cubierta",
|
||||||
"sobrecubierta",
|
"sobrecubierta",
|
||||||
|
"guardas",
|
||||||
"inkjet",
|
"inkjet",
|
||||||
"rotativa",
|
"rotativa",
|
||||||
"isActivo",
|
"isActivo",
|
||||||
@ -146,7 +148,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
|||||||
->select(
|
->select(
|
||||||
"t1.id AS id, t1.nombre AS nombre, t1.defecto AS defecto, t1.referencia AS referencia, t1.mano AS mano,
|
"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.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.inkjet AS inkjet, t1.rotativa AS rotativa,
|
||||||
t1.isActivo AS isActivo, t2.nombre AS papel_generico_id"
|
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;
|
$color = array_key_exists('color', $options)? $options['color'] : null;
|
||||||
$cubierta = array_key_exists('cubierta', $options)? $options['cubierta'] : null;
|
$cubierta = array_key_exists('cubierta', $options)? $options['cubierta'] : null;
|
||||||
$sobrecubierta = array_key_exists('sobrecubierta', $options)? $options['sobrecubierta'] : 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;
|
$rotativa = array_key_exists('rotativa', $options)? $options['rotativa'] : null;
|
||||||
|
|
||||||
$builder = $this->db
|
$builder = $this->db
|
||||||
@ -254,6 +257,9 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
|||||||
if(!is_null($sobrecubierta)){
|
if(!is_null($sobrecubierta)){
|
||||||
$builder->where("t1.sobrecubierta", $sobrecubierta);
|
$builder->where("t1.sobrecubierta", $sobrecubierta);
|
||||||
}
|
}
|
||||||
|
if(!is_null($guardas)){
|
||||||
|
$builder->where("t1.guardas", $guardas);
|
||||||
|
}
|
||||||
if(!is_null($rotativa)){
|
if(!is_null($rotativa)){
|
||||||
$builder->where("t1.rotativa", $rotativa);
|
$builder->where("t1.rotativa", $rotativa);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,6 +90,16 @@
|
|||||||
</div><!--//.form-check -->
|
</div><!--//.form-check -->
|
||||||
</div><!--//.mb-3 -->
|
</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="mb-3">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
<th><?= lang('PapelImpresion.color') ?></th>
|
<th><?= lang('PapelImpresion.color') ?></th>
|
||||||
<th><?= lang('PapelImpresion.cubierta') ?></th>
|
<th><?= lang('PapelImpresion.cubierta') ?></th>
|
||||||
<th><?= lang('PapelImpresion.sobrecubierta') ?></th>
|
<th><?= lang('PapelImpresion.sobrecubierta') ?></th>
|
||||||
|
<th><?= lang('PapelImpresion.guardas') ?></th>
|
||||||
<th><?= lang('PapelImpresion.inkjet') ?></th>
|
<th><?= lang('PapelImpresion.inkjet') ?></th>
|
||||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||||
@ -101,6 +102,7 @@
|
|||||||
{ 'data': 'color' },
|
{ 'data': 'color' },
|
||||||
{ 'data': 'cubierta' },
|
{ 'data': 'cubierta' },
|
||||||
{ 'data': 'sobrecubierta' },
|
{ 'data': 'sobrecubierta' },
|
||||||
|
{ 'data': 'guardas' },
|
||||||
{ 'data': 'inkjet' },
|
{ 'data': 'inkjet' },
|
||||||
{ 'data': 'rotativa' },
|
{ 'data': 'rotativa' },
|
||||||
{ 'data': 'isActivo' },
|
{ 'data': 'isActivo' },
|
||||||
@ -110,7 +112,7 @@
|
|||||||
|
|
||||||
|
|
||||||
theTable.on( 'draw.dt', function () {
|
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) {
|
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