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;