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;