diff --git a/ci4/app/Controllers/Configuracion/Papelesgenericos.php b/ci4/app/Controllers/Configuracion/Papelesgenericos.php index 82f26748..af7cfa22 100755 --- a/ci4/app/Controllers/Configuracion/Papelesgenericos.php +++ b/ci4/app/Controllers/Configuracion/Papelesgenericos.php @@ -160,6 +160,9 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController $sanitizedData['show_in_client_special'] = false; } + if($sanitizedData['show_in_client_special']){ + $sanitizedData['show_in_client'] = true; + } $noException = true; if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) : diff --git a/ci4/app/Controllers/Configuracion/Papelesimpresion.php b/ci4/app/Controllers/Configuracion/Papelesimpresion.php index 15f7160e..b92d69a8 100755 --- a/ci4/app/Controllers/Configuracion/Papelesimpresion.php +++ b/ci4/app/Controllers/Configuracion/Papelesimpresion.php @@ -209,6 +209,19 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController if ($this->request->getPost('inkjet') == null) { $sanitizedData['inkjet'] = false; } + if ($this->request->getPost('isActivo') == null) { + $sanitizedData['isActivo'] = false; + } + if ($this->request->getPost('show_in_client') == null) { + $sanitizedData['show_in_client'] = false; + } + if ($this->request->getPost('show_in_client_special') == null) { + $sanitizedData['show_in_client_special'] = false; + } + + if($sanitizedData['show_in_client_special']){ + $sanitizedData['show_in_client'] = true; + } // Hay que asegurarse de que se quitan los consumos de tintas de rotativa // en caso de que se haya deseleccionado la opción rotativa diff --git a/ci4/app/Entities/Configuracion/PapelImpresion.php b/ci4/app/Entities/Configuracion/PapelImpresion.php index b2ef88ce..c8cc8983 100755 --- a/ci4/app/Entities/Configuracion/PapelImpresion.php +++ b/ci4/app/Entities/Configuracion/PapelImpresion.php @@ -22,6 +22,9 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity "guardas" => false, "inkjet" => false, "rotativa" => false, + "isActivo" => true, + "show_in_client" => false, + "show_in_client_special" => false, "is_deleted" => 0, "created_at" => null, "updated_at" => null, @@ -39,6 +42,9 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity "sobrecubierta" => "boolean", "guardas" => "boolean", "rotativa" => "boolean", + "isActivo" => "boolean", + "show_in_client" => "boolean", + "show_in_client_special" => "boolean", "is_deleted" => "int", ]; } diff --git a/ci4/app/Language/es/PapelImpresion.php b/ci4/app/Language/es/PapelImpresion.php index 46cfe47b..9096bb3e 100755 --- a/ci4/app/Language/es/PapelImpresion.php +++ b/ci4/app/Language/es/PapelImpresion.php @@ -35,6 +35,8 @@ return [ 'rotativa' => 'Rotativa', 'updatedAt' => 'Actualizado en', 'activo' => 'Activo?', + 'showInClient' => 'Mostrar en cliente', + 'showInClientSpecial' => 'Papel especial cliente', 'userUpdateId' => 'ID usuario actualización', 'consumo_tintas_rotativas' => 'Consumo tintas', diff --git a/ci4/app/Models/Configuracion/PapelImpresionModel.php b/ci4/app/Models/Configuracion/PapelImpresionModel.php index 276892af..c2d5b91f 100755 --- a/ci4/app/Models/Configuracion/PapelImpresionModel.php +++ b/ci4/app/Models/Configuracion/PapelImpresionModel.php @@ -23,7 +23,9 @@ class PapelImpresionModel extends \App\Models\BaseModel 7 => "t1.guardas", 8 => "t1.inkjet", 9 => "t1.rotativa", - 10 => "t1.isActivo" + 10 => "t1.isActivo", + 11 => "t1.show_in_client", + 12 => "t1.show_in_client_special" ]; @@ -44,6 +46,8 @@ class PapelImpresionModel extends \App\Models\BaseModel "inkjet", "rotativa", "isActivo", + "show_in_client", + "show_in_client_special", "deleted_at", "is_deleted", "user_updated_id", diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelGenericoFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelGenericoFormItems.php index a5c18b8e..7d55da9f 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelGenericoFormItems.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelGenericoFormItems.php @@ -31,6 +31,7 @@ = lang('PapelGenerico.showInClient') ?> show_in_client_special == true ? 'disabled' : ''; ?> = $papelGenerico->show_in_client == true ? 'checked' : ''; ?>> 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 964e9916..54d50470 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/papel/_papelImpresionFormItems.php @@ -1,165 +1,202 @@ -