From f1edf72fb8629e8f11dfd88ffa87aa55dd38f3ed Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 11 Oct 2021 14:32:54 +0800 Subject: [PATCH] temp show specific report period --- app/Http/Controllers/Reports/MonthlyReportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),