ot new features

This commit is contained in:
amazuecos
2025-05-01 06:02:22 +02:00
parent cf4c4df80a
commit a259d76e5e
32 changed files with 760 additions and 134 deletions

View File

@ -30,10 +30,11 @@ class OrdenTrabajoEntity extends Entity
"progreso" => 0.00,
"estado" => "I",
"comentarios" => null,
"comment_interior"=> null,
"comment_cubierta"=> null,
"comment_encuadernacion"=> null,
"comment_logistica"=> null,
"comment_interior" => null,
"comment_cubierta" => null,
"comment_encuadernacion" => null,
"comment_logistica" => null,
"info_solapa_guillotina" => null,
"revisar_formato" => null,
"revisar_lomo" => null,
"revisar_solapa" => null,
@ -57,10 +58,11 @@ class OrdenTrabajoEntity extends Entity
"progreso" => "float",
"estado" => "string",
"comentarios" => "?string",
"comment_interior"=> "?string",
"comment_cubierta"=> "?string",
"comment_encuadernacion"=> "?string",
"comment_logistica"=> "?string",
"comment_interior" => "?string",
"comment_cubierta" => "?string",
"comment_encuadernacion" => "?string",
"comment_logistica" => "?string",
"info_solapa_guillotina" => "?string",
"revisar_formato" => "bool",
"revisar_lomo" => "bool",
"revisar_solapa" => "bool",
@ -88,7 +90,22 @@ class OrdenTrabajoEntity extends Entity
$m = model(OrdenTrabajoTarea::class);
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
}
/**
public function tareas_acabado(): array
{
$m = model(OrdenTrabajoTarea::class);
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_acabado_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
}
public function tareas_encuadernado(): array
{
$m = model(OrdenTrabajoTarea::class);
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_encuadernado_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
}
public function tareas_manipulado(): array
{
$m = model(OrdenTrabajoTarea::class);
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_manipulado_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
}
/**
* Devuelve el presupuesto de la orden de trabajo
*
* @return PresupuestoEntity
@ -191,4 +208,5 @@ class OrdenTrabajoEntity extends Entity
];
return $estados[$this->attributes["estado"]];
}
}