diff --git a/app/Http/Controllers/Reports/MonthlyReportController.php b/app/Http/Controllers/Reports/MonthlyReportController.php index 2892c231..5cc96d9e 100644 --- a/app/Http/Controllers/Reports/MonthlyReportController.php +++ b/app/Http/Controllers/Reports/MonthlyReportController.php @@ -52,7 +52,7 @@ class MonthlyReportController 'containers' => count($containers), 'activated_orders' => count($orders), 'active_customers' => count($customers), - 'new_customers' => CompanyModule::where('type', BusinessType::IMPORTER)->whereMonth('created_at', $today->format('m'))->whereYear('created_at', $today->format('Y'))->count(), + 'new_customers' => CompanyModule::where('type', BusinessType::IMPORTER)->whereDay('created_at', '>=', 1)->whereDay('created_at', '<=', 5)->whereMonth('created_at', $today->format('m'))->whereYear('created_at', $today->format('Y'))->count(), 'new_converted_customers' => CompanyModule::where('type', BusinessType::IMPORTER)->whereMonth('created_at', $today->format('m'))->whereYear('created_at', $today->format('Y'))->whereHas('orders', function($order){ return $order->whereHas('packingLists'); })->count(),