diff --git a/ci4/app/Controllers/Configuracion/Papelesimpresion.php b/ci4/app/Controllers/Configuracion/Papelesimpresion.php index 9f051a44..82025dc4 100755 --- a/ci4/app/Controllers/Configuracion/Papelesimpresion.php +++ b/ci4/app/Controllers/Configuracion/Papelesimpresion.php @@ -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; } diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index 9c38f178..a9ad8bb0 100755 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -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, diff --git a/ci4/app/Entities/Configuracion/PapelImpresion.php b/ci4/app/Entities/Configuracion/PapelImpresion.php index f8b796fa..b2ef88ce 100755 --- a/ci4/app/Entities/Configuracion/PapelImpresion.php +++ b/ci4/app/Entities/Configuracion/PapelImpresion.php @@ -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", ]; diff --git a/ci4/app/Language/es/PapelImpresion.php b/ci4/app/Language/es/PapelImpresion.php index b2fc1170..46cfe47b 100755 --- a/ci4/app/Language/es/PapelImpresion.php +++ b/ci4/app/Language/es/PapelImpresion.php @@ -10,6 +10,7 @@ return [ 'createdAt' => 'Creado en', 'cubierta' => 'Cubierta', 'sobrecubierta' => 'Sobrecubierta', + 'guardas' => 'Guardas', 'defecto' => 'Por defecto', 'deletedAt' => 'Borrado en', 'espesor' => 'Espesor', diff --git a/ci4/app/Models/Configuracion/PapelImpresionModel.php b/ci4/app/Models/Configuracion/PapelImpresionModel.php index 874ffa71..8bb0d247 100755 --- a/ci4/app/Models/Configuracion/PapelImpresionModel.php +++ b/ci4/app/Models/Configuracion/PapelImpresionModel.php @@ -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); } diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelImpresionFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelImpresionFormItems.php index f8439fd3..964e9916 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelImpresionFormItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelImpresionFormItems.php @@ -90,6 +90,16 @@ +