diff --git a/app/Http/Livewire/ShowReportes.php b/app/Http/Livewire/ShowReportes.php index 3d2d0fd..058deb5 100755 --- a/app/Http/Livewire/ShowReportes.php +++ b/app/Http/Livewire/ShowReportes.php @@ -50,8 +50,8 @@ class ShowReportes extends Component if (!empty($this->mes)) { - $consulta_suma = Historiale::whereMonth('created_at',$this->mes)->sum('valor'); - $consulta_cantidad = Historiale::whereMonth('created_at',$this->mes)->count(); + $consulta_suma = Historiale::where('vendedor_id', auth()->user()->id)->whereMonth('created_at',$this->mes)->sum('valor'); + $consulta_cantidad = Historiale::where('vendedor_id', auth()->user()->id)->whereMonth('created_at',$this->mes)->count(); } }