maquinista view-basic

This commit is contained in:
amazuecos
2025-04-25 07:40:20 +02:00
parent 288a3f02eb
commit 52b3b1ae4d
28 changed files with 911 additions and 132 deletions

View File

@ -3,6 +3,7 @@
namespace App\Entities\Produccion;
use App\Entities\Pedidos\PedidoEntity;
use App\Entities\Presupuestos\PresupuestoEntity;
use App\Entities\Usuarios\UserEntity;
use App\Models\OrdenTrabajo\OrdenTrabajoDate;
use App\Models\OrdenTrabajo\OrdenTrabajoFileModel;
@ -78,6 +79,15 @@ 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() ?? [];
}
/**
* Devuelve el presupuesto de la orden de trabajo
*
* @return PresupuestoEntity
*/
public function presupuesto(): ?PresupuestoEntity
{
return $this->pedido()->presupuesto();
}
/**
* Devuelve el pedido de la orden de trabajo