mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'dev/import_users'
Main See merge request jjimenez/safekat!401
This commit is contained in:
@ -188,6 +188,9 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
if ($this->request->getPost('defecto') == null) {
|
||||
$sanitizedData['defecto'] = false;
|
||||
}
|
||||
if ($this->request->getPost('interior') == null) {
|
||||
$sanitizedData['interior'] = false;
|
||||
}
|
||||
if ($this->request->getPost('bn') == null) {
|
||||
$sanitizedData['bn'] = false;
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddTickInteriorPapelImpresion extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$fields = [
|
||||
'interior' => [
|
||||
'type' => 'TINYINT',
|
||||
'constraint' => 1,
|
||||
'null' => false,
|
||||
'default' => 0,
|
||||
],
|
||||
];
|
||||
$this->forge->addColumn('lg_papel_impresion', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn('lg_papel_impresion', 'interior');
|
||||
}
|
||||
}
|
||||
@ -15,6 +15,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"espesor" => 0.0,
|
||||
"gramaje" => null,
|
||||
"precio_tonelada" => null,
|
||||
"interior" => true,
|
||||
"bn" => true,
|
||||
"color" => true,
|
||||
"cubierta" => false,
|
||||
@ -35,6 +36,7 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"espesor" => "float",
|
||||
"gramaje" => "float",
|
||||
"precio_tonelada" => "float",
|
||||
"interior" => "boolean",
|
||||
"bn" => "boolean",
|
||||
"color" => "boolean",
|
||||
"cubierta" => "boolean",
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
return [
|
||||
'alto' => 'Alto',
|
||||
'ancho' => 'Ancho',
|
||||
'interior' => 'Interior',
|
||||
'bn' => 'B/N',
|
||||
'color' => 'Color',
|
||||
'createdAt' => 'Creado en',
|
||||
|
||||
@ -383,6 +383,7 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
$builder->where("t2.cubierta", 1);
|
||||
$builder->where("t5.uso", 'cubierta');
|
||||
} else {
|
||||
$builder->where("t2.interior", 1);
|
||||
$builder->where("t5.uso", 'interior');
|
||||
if ($tipo == 'negro' || $tipo == 'negrohq')
|
||||
$builder->where("t2.bn", 1);
|
||||
|
||||
@ -16,15 +16,16 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
0 => "t1.nombre",
|
||||
1 => "t2.nombre",
|
||||
2 => "t1.gramaje",
|
||||
3 => "t1.bn",
|
||||
4 => "t1.color",
|
||||
5 => "t1.cubierta",
|
||||
6 => "t1.sobrecubierta",
|
||||
7 => "t1.guardas",
|
||||
8 => "t1.inkjet",
|
||||
9 => "t1.rotativa",
|
||||
10 => "t1.isActivo",
|
||||
11 => "t1.use_in_client",
|
||||
3 => "t1.interior",
|
||||
4 => "t1.bn",
|
||||
5 => "t1.color",
|
||||
6 => "t1.cubierta",
|
||||
7 => "t1.sobrecubierta",
|
||||
8 => "t1.guardas",
|
||||
9 => "t1.inkjet",
|
||||
10 => "t1.rotativa",
|
||||
11 => "t1.isActivo",
|
||||
12 => "t1.use_in_client",
|
||||
];
|
||||
|
||||
|
||||
@ -37,6 +38,7 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
"espesor",
|
||||
"gramaje",
|
||||
"precio_tonelada",
|
||||
"interior",
|
||||
"bn",
|
||||
"color",
|
||||
"cubierta",
|
||||
@ -149,7 +151,7 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
->table($this->table . " t1")
|
||||
->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.espesor AS espesor, t1.gramaje AS gramaje, t1.interior AS interior, t1.precio_tonelada AS precio_tonelada,
|
||||
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,
|
||||
|
||||
@ -91,10 +91,10 @@
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="cubierta" class="form-check-label">
|
||||
<input type="checkbox" id="cubierta" name="cubierta" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->cubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.cubierta') ?>
|
||||
<label for="interior" class="form-check-label">
|
||||
<input type="checkbox" id="interior" name="interior" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->interior == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.interior') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
@ -155,6 +155,17 @@
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="cubierta" class="form-check-label">
|
||||
<input type="checkbox" id="cubierta" name="cubierta" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->cubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.cubierta') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
<th><?= lang('PapelImpresion.nombre') ?></th>
|
||||
<th><?= lang('PapelGenerico.papelGenerico') ?></th>
|
||||
<th><?= lang('PapelImpresion.gramaje') ?></th>
|
||||
<th><?= lang('PapelImpresion.interior') ?></th>
|
||||
<th><?= lang('PapelImpresion.bn') ?></th>
|
||||
<th><?= lang('PapelImpresion.color') ?></th>
|
||||
<th><?= lang('PapelImpresion.cubierta') ?></th>
|
||||
@ -99,6 +100,7 @@
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'papel_generico_id' },
|
||||
{ 'data': 'gramaje' },
|
||||
{ 'data': 'interior' },
|
||||
{ 'data': 'bn' },
|
||||
{ 'data': 'color' },
|
||||
{ 'data': 'cubierta' },
|
||||
|
||||
Reference in New Issue
Block a user