diff --git a/app/Http/Livewire/ShowServicios.php b/app/Http/Livewire/ShowServicios.php index cd2c212..9f657cd 100755 --- a/app/Http/Livewire/ShowServicios.php +++ b/app/Http/Livewire/ShowServicios.php @@ -299,7 +299,7 @@ class ShowServicios extends Component ->whereDate('vencimiento', '>=', $this->fecha_final_1) ->whereDate('vencimiento', '<=', $this->fecha_final_2) // ->whereDate('vencimiento','>=', $this->fechaFinal) - ->Orderby('created_at', 'ASC') + ->Orderby('inicio', 'ASC') ->withCount('historiales') ->where('estado', 'activo') ->having('historiales_count', '<=', $suma) @@ -317,7 +317,7 @@ class ShowServicios extends Component ->whereDate('inicio', '>=', $this->fecha) ->whereDate('vencimiento', '>=', $this->fecha_final_1) ->whereDate('vencimiento', '<=', $this->fecha_final_2) - ->Orderby('created_at', 'ASC') + ->Orderby('inicio', 'ASC') ->withCount('historiales') ->where('estado', 'activo') ->having('historiales_count', '<=', $suma3) @@ -337,7 +337,7 @@ class ShowServicios extends Component ->whereDate('inicio', '>=', $this->fecha) ->whereDate('vencimiento', '>=', $this->fecha_final_1) ->whereDate('vencimiento', '<=', $this->fecha_final_2) - ->Orderby('created_at', 'ASC') + ->Orderby('inicio', 'ASC') ->withCount('historiales') ->where('estado', 'pendiente') ->doesntHave('perfil') @@ -349,7 +349,7 @@ class ShowServicios extends Component ->whereDate('inicio', '>=', $this->fecha) ->whereDate('vencimiento', '>=', $this->fecha_final_1) ->whereDate('vencimiento', '<=', $this->fecha_final_2) - ->Orderby('created_at', 'ASC') + ->Orderby('inicio', 'ASC') ->withCount('historiales') ->where('estado', 'activo') ->having('historiales_count', '<=', $suma2)