From 0102dabdba2f80f8b275f4d9ee283118f06fd396 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 31 May 2022 15:18:40 +0800 Subject: [PATCH] update smc monthly summary containers ref --- routes/web.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 6313f9c7..a5af58f5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -271,8 +271,7 @@ Route::get('/settings', function () { })->name('settings'); Route::get('/customer/summary/monthly', function () { - dd(\Carbon\Carbon::now()->format('m')); - $containers = Container::whereMonth('loading_date', 5)->get(); + $containers = Container::whereMonth('loading_date', '>', ((float)\Carbon\Carbon::now()->format('m') - 1))->get(); // $containers = Container::whereIn('reference', ['cs-6062', 'eps-3926', 'sh-1122', 'sh-1121', 'eps-3925', 'cs-6060', 'eps-3927', 'cs-6066', 'cs-6069'])->get(); foreach ($containers as $container){ $packingLists = $container->packingLists()->get()->filter(function ($packingList) {