From 0a47de187101cf73dcf6fde3617f195ac33eced9 Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:48:30 -0500 Subject: [PATCH] Update ShowServicios.php --- app/Http/Livewire/ShowServicios.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Livewire/ShowServicios.php b/app/Http/Livewire/ShowServicios.php index 317486b..9857520 100755 --- a/app/Http/Livewire/ShowServicios.php +++ b/app/Http/Livewire/ShowServicios.php @@ -350,7 +350,12 @@ class ShowServicios extends Component ->Orderby('inicio', 'ASC') ->withCount('historiales') ->where('estado', 'pendiente') - ->doesntHave('perfil') + ->where(function ($query) { + $query->doesntHave('perfil') + ->orWhereHas('perfil', function ($query) { + $query->whereNull('historial_id'); + }); + }) ->get(); } elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) { $suma2 = $pantalla_servicio - $pantallas;