temp show specific report period

This commit is contained in:
omair saleh
2021-10-11 14:24:44 +08:00
parent a21465992f
commit 6809bfc693
@@ -21,7 +21,7 @@ class MonthlyReportController
public function salesReport(Request $request): JsonResponse {
$today = Carbon::now()->subMonth();
$containers = Container::whereDay('loading_date', '>=', 1)->whereDay('loading_date', '<=', 5)->whereMonth('loading_date', $today->format('m'))->whereYear('loading_date', $today->format('Y'))->orderBy('loading_date')->get();
$containers = Container::whereDay('loading_date', '>=', 6)->whereDay('loading_date', '<=', 12)->whereMonth('loading_date', $today->format('m'))->whereYear('loading_date', $today->format('Y'))->orderBy('loading_date')->get();
$packages = $containers->flatMap(function ($container) {