papel generico terminado. papel impresion a falta de maquinas y tipologias

This commit is contained in:
Jaime Jimenez
2023-05-28 12:33:07 +02:00
parent e8d733f39d
commit 1cfa5bd60b
29 changed files with 1902 additions and 381 deletions

View File

@ -13,14 +13,14 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
protected $useAutoIncrement = true;
const SORTABLE = [
0 => "t1.id",
1 => "t1.nombre",
2 => "t1.code",
3 => "t1.code_ot",
4 => "t1.show_in_client",
//0 => "t1.id",
0 => "t1.nombre",
1 => "t1.code",
2 => "t1.code_ot",
3 => "t1.show_in_client",
];
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client"];
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client","deleted_at","is_deleted"];
protected $returnType = "App\Entities\Configuracion\PapelGenerico";
protected $useTimestamps = true;
@ -34,29 +34,29 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
protected $validationRules = [
"code" => [
"label" => "PapelGenerico.code",
"label" => "PapelGenericoes.code",
"rules" => "trim|max_length[5]",
],
"code_ot" => [
"label" => "PapelGenerico.codeOt",
"label" => "PapelGenericoes.codeOt",
"rules" => "trim|max_length[5]",
],
"nombre" => [
"label" => "PapelGenerico.nombre",
"label" => "PapelGenericoes.nombre",
"rules" => "trim|required|max_length[255]",
],
];
protected $validationMessages = [
"code" => [
"max_length" => "PapelGenerico.validation.code.max_length",
"max_length" => "PapelGenericoes.validation.code.max_length",
],
"code_ot" => [
"max_length" => "PapelGenerico.validation.code_ot.max_length",
"max_length" => "PapelGenericoes.validation.code_ot.max_length",
],
"nombre" => [
"max_length" => "PapelGenerico.validation.nombre.max_length",
"required" => "PapelGenerico.validation.nombre.required",
"max_length" => "PapelGenericoes.validation.nombre.max_length",
"required" => "PapelGenericoes.validation.nombre.required",
],
];
@ -73,7 +73,8 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
->table($this->table . " t1")
->select(
"t1.id AS id, t1.nombre AS nombre, t1.code AS code, t1.code_ot AS code_ot, t1.show_in_client AS show_in_client"
);
)
->where("is_deleted", 0);
return empty($search)
? $builder