mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
update export-customer-order
This commit is contained in:
+6
-3
@@ -378,9 +378,12 @@ Route::get('/export-customer-order/{marking}', 'Exports\ExportCompanyModuleSumma
|
||||
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', '>=', 9)->whereYear('loading_date', 2022)->get();
|
||||
$marking = '769SMC';
|
||||
$connection = CompanyConnection::where('invitee_reference', $marking)->first();
|
||||
$companyModuleId = $connection->invitee->id;
|
||||
foreach ($containers as $container){
|
||||
$packingLists = $container->packingLists()->get()->filter(function ($packingList) {
|
||||
return $packingList->owner->company_module_id === 248;
|
||||
$packingLists = $container->packingLists()->get()->filter(function ($packingList) use ($companyModuleId){
|
||||
return $packingList->owner->company_module_id === $companyModuleId;
|
||||
});
|
||||
|
||||
if (!count($packingLists)) continue;
|
||||
@@ -405,7 +408,7 @@ Route::get('/customer/summary/monthly', function () {
|
||||
foreach ($packages as $package){
|
||||
echo '<tr>
|
||||
<td>'.$container->loading_date->format('d-m-Y').'</td>
|
||||
<td>MS/CIEF/769SMC/'.$packingList->owner->reference.'</td>
|
||||
<td>MS/CIEF/769SMC/'.$packingList->owner->owner->reference.'</td>
|
||||
<td>'.$container->reference.'</td>
|
||||
<td>'.$package->description.'</td>
|
||||
<td>'.$package->quantity.'</td>
|
||||
|
||||
Reference in New Issue
Block a user