From a40ea21787e3a1f735ca38346e95fec7b789f1a7 Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:42:20 -0500 Subject: [PATCH] Update ShowServicios.php --- app/Http/Livewire/ShowServicios.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Livewire/ShowServicios.php b/app/Http/Livewire/ShowServicios.php index 368972d..c9c55bd 100755 --- a/app/Http/Livewire/ShowServicios.php +++ b/app/Http/Livewire/ShowServicios.php @@ -190,6 +190,7 @@ class ShowServicios extends Component $cuentas_pantallas = Cuentas::fromSub($baseQuery, 'alias') ->where('historiales_count', '<=', $cantidad_restante) ->orderBy('inicio', 'ASC') + ->lockForUpdate() ->get(); @@ -320,6 +321,7 @@ class ShowServicios extends Component $cuenta = Cuentas::fromSub($baseQuery, 'alias') ->where('historiales_count', '<=', $suma) ->orderBy('inicio', 'ASC') + ->lockForUpdate() ->get(); @@ -339,6 +341,7 @@ class ShowServicios extends Component $cuenta = Cuentas::fromSub($baseQuery, 'alias') ->where('historiales_count', '<=', $suma3) ->orderBy('inicio', 'ASC') + ->lockForUpdate() ->get(); } } elseif ((int) $pantalla_servicio_completa == (int) $this->pantallas_tarjetaPlan) { @@ -368,6 +371,7 @@ class ShowServicios extends Component $cuenta = Cuentas::fromSub($baseQuery, 'alias') ->where('historiales_count', '<=', $suma2) ->orderBy('inicio', 'ASC') + ->lockForUpdate() ->get(); } else { $cuenta = null;