temp show specific report period

This commit is contained in:
omair saleh
2021-10-11 14:28:05 +08:00
parent d5d2a13e31
commit ae031078bc
@@ -21,7 +21,7 @@ class MonthlyReportController
public function salesReport(Request $request): JsonResponse {
$today = Carbon::now()->subMonth();
$containers = Container::whereDay('loading_date', '>=', 13)->whereDay('loading_date', '<=', 19)->whereMonth('loading_date', $today->format('m'))->whereYear('loading_date', $today->format('Y'))->orderBy('loading_date')->get();
$containers = Container::whereDay('loading_date', '>=', 20)->whereDay('loading_date', '<=', 26)->whereMonth('loading_date', $today->format('m'))->whereYear('loading_date', $today->format('Y'))->orderBy('loading_date')->get();
$packages = $containers->flatMap(function ($container) {