top solo activos
This commit is contained in:
@@ -25,7 +25,7 @@ class ShowTop extends Component
|
|||||||
$month = $this->showLastMonth ? date('m', strtotime('last month')) : date('m');
|
$month = $this->showLastMonth ? date('m', strtotime('last month')) : date('m');
|
||||||
|
|
||||||
$consulta_ventas = User::with(['historiales_venta' => function ($query) use ($month) {
|
$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) {
|
->withCount(['historiales_venta' => function ($query) use ($month) {
|
||||||
$query->whereMonth('fecha_inicio', $month);
|
$query->whereMonth('fecha_inicio', $month);
|
||||||
|
|||||||
Reference in New Issue
Block a user