diff --git a/ci4/app/Controllers/Configuracion/Papelesimpresion.php b/ci4/app/Controllers/Configuracion/Papelesimpresion.php index 27d4dcce..9b820be4 100755 --- a/ci4/app/Controllers/Configuracion/Papelesimpresion.php +++ b/ci4/app/Controllers/Configuracion/Papelesimpresion.php @@ -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; } diff --git a/ci4/app/Database/Migrations/2024-11-25-173558_AddTickInteriorPapelImpresion.php b/ci4/app/Database/Migrations/2024-11-25-173558_AddTickInteriorPapelImpresion.php new file mode 100644 index 00000000..85cc60d3 --- /dev/null +++ b/ci4/app/Database/Migrations/2024-11-25-173558_AddTickInteriorPapelImpresion.php @@ -0,0 +1,26 @@ + [ + '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'); + } +} diff --git a/ci4/app/Entities/Configuracion/PapelImpresion.php b/ci4/app/Entities/Configuracion/PapelImpresion.php index b48f1875..d2e0b2ff 100755 --- a/ci4/app/Entities/Configuracion/PapelImpresion.php +++ b/ci4/app/Entities/Configuracion/PapelImpresion.php @@ -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", diff --git a/ci4/app/Language/es/PapelImpresion.php b/ci4/app/Language/es/PapelImpresion.php index f1225ba8..780fc979 100755 --- a/ci4/app/Language/es/PapelImpresion.php +++ b/ci4/app/Language/es/PapelImpresion.php @@ -5,6 +5,7 @@ return [ 'alto' => 'Alto', 'ancho' => 'Ancho', + 'interior' => 'Interior', 'bn' => 'B/N', 'color' => 'Color', 'createdAt' => 'Creado en', diff --git a/ci4/app/Models/Configuracion/PapelGenericoModel.php b/ci4/app/Models/Configuracion/PapelGenericoModel.php index 5f1ba92f..34dacfe0 100755 --- a/ci4/app/Models/Configuracion/PapelGenericoModel.php +++ b/ci4/app/Models/Configuracion/PapelGenericoModel.php @@ -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); diff --git a/ci4/app/Models/Configuracion/PapelImpresionModel.php b/ci4/app/Models/Configuracion/PapelImpresionModel.php index d16a7232..814463f8 100755 --- a/ci4/app/Models/Configuracion/PapelImpresionModel.php +++ b/ci4/app/Models/Configuracion/PapelImpresionModel.php @@ -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, diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php index c9ddf8dd..b094e35d 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php @@ -91,10 +91,10 @@
-
@@ -155,6 +155,17 @@ +
+
+ + +
+
+
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php index 833fe8b9..2ba47b1d 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/viewPapelImpresionList.php @@ -21,6 +21,7 @@ + @@ -99,6 +100,7 @@ { 'data': 'nombre' }, { 'data': 'papel_generico_id' }, { 'data': 'gramaje' }, + { 'data': 'interior' }, { 'data': 'bn' }, { 'data': 'color' }, { 'data': 'cubierta' },