From ebe649c7d8a585bf9c689b752d2a48fc4ad86dab Mon Sep 17 00:00:00 2001 From: amazuecos Date: Mon, 2 Sep 2024 23:31:50 +0200 Subject: [PATCH] feat : add method findByPresupuesto --- ci4/app/Models/Pedidos/PedidoLineaModel.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci4/app/Models/Pedidos/PedidoLineaModel.php b/ci4/app/Models/Pedidos/PedidoLineaModel.php index 52284cb4..44a9f946 100644 --- a/ci4/app/Models/Pedidos/PedidoLineaModel.php +++ b/ci4/app/Models/Pedidos/PedidoLineaModel.php @@ -216,5 +216,10 @@ class PedidoLineaModel extends \App\Models\BaseModel return $resultaArray; } - + public function findByPresupuesto(int $presupuestoId){ + $builder = $this->db + ->table($this->table) + ->select(); + return $builder->where('presupuesto_id',$presupuestoId)->get()->getFirstRow(); + } } \ No newline at end of file