update export-customer-order

This commit is contained in:
edmondlang
2023-02-20 22:14:09 +08:00
parent 7f4fdf0191
commit 32936af538
+2 -1
View File
@@ -376,7 +376,8 @@ Route::get('/customer/{company_module_id}/summary', 'Exports\ExportCompanyModule
Route::get('/export-customer-order/{marking}', 'Exports\ExportCompanyModuleSummaryController@exportorderSummaryByMarking')->name('customer.orderSummary.export');
Route::get('/customer/summary/monthly', function () {
$containers = Container::whereMonth('loading_date', '>=', ((float)Carbon::now()->format('m') - 2))->whereYear('loading_date', (float)Carbon::now()->format('Y'))->get();
// $containers = Container::whereMonth('loading_date', '>=', ((float)Carbon::now()->format('m') - 2))->whereYear('loading_date', (float)Carbon::now()->format('Y'))->get();
$containers = Container::whereMonth('loading_date', '>=', 9)->whereYear('loading_date', 2022)->get();
foreach ($containers as $container){
$packingLists = $container->packingLists()->get()->filter(function ($packingList) {
return $packingList->owner->company_module_id === 248;