From c33649fda269789f5ab91bf8fb6bb44402c141d3 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 12 Oct 2021 13:54:46 +0800 Subject: [PATCH] fix daily cbm report --- 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 28c2831c..177a2feb 100644 --- a/app/Http/Controllers/Reports/MonthlyReportController.php +++ b/app/Http/Controllers/Reports/MonthlyReportController.php @@ -44,7 +44,7 @@ class MonthlyReportController return $date->isWeekday(); - }, $to->endOfMonth()); + }, $request->route('to') ? Carbon::parse($request->route('to'))->endOfMonth() : Carbon::now()->endOfMonth()); return (new ApiResponseObject('fetch monthly report Successful', '',