From 5c23236b9b918675c67e2945521b930bde49849f Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:12:22 -0500 Subject: [PATCH] update reporte --- app/Http/Livewire/ShowReportes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }