top solo activos

This commit is contained in:
Felipe
2024-04-19 08:22:43 -05:00
parent 9932ca047f
commit 8098a7d358
+1 -1
View File
@@ -25,7 +25,7 @@ class ShowTop extends Component
$month = $this->showLastMonth ? date('m', strtotime('last month')) : date('m');
$consulta_ventas = User::with(['historiales_venta' => function ($query) use ($month) {
$query->whereMonth('fecha_inicio', $month);
$query->whereMonth('fecha_inicio', $month)->where('estado', 'activo');
}])
->withCount(['historiales_venta' => function ($query) use ($month) {
$query->whereMonth('fecha_inicio', $month);