mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fix export arrival list
This commit is contained in:
@@ -44,7 +44,7 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
$packingLists = PackingList::where('type', '=', 1)->where('status', '=', 2)->where('owner_type', '!=', CompanyModule::class)->whereHas('transports', function ($query){
|
||||
return $query->whereMonth('drop_date', '>', 3)->whereYear('drop_date', 2022);
|
||||
})->get();
|
||||
dd($packingLists);
|
||||
|
||||
foreach($packingLists as $packingList){
|
||||
$packages = !$packingList->packingLists()->exists() ? $packingList->packages : $packingList->packingLists->first()->packages;
|
||||
foreach ($packages as $package) {
|
||||
@@ -63,9 +63,9 @@ dd($packingLists);
|
||||
{
|
||||
$packingList = $package->packingList;
|
||||
$order = $packingList->owner;
|
||||
|
||||
// $connection = $order->companyModule()->first()->inviters()->withPivot('invitee_reference')->first();
|
||||
// $marking = $connection ? $connection->pivot->invitee_reference:'';
|
||||
dump($order);
|
||||
$connection = $order->companyModule()->first()->inviters()->withPivot('invitee_reference')->first();
|
||||
$marking = $connection ? $connection->pivot->invitee_reference:'';
|
||||
|
||||
$warehouse = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee;
|
||||
|
||||
@@ -75,7 +75,7 @@ dd($packingLists);
|
||||
|
||||
return [
|
||||
$packingList->owner->reference,
|
||||
// $marking,
|
||||
$marking,
|
||||
$warehouse->reference,
|
||||
$cbm,
|
||||
$package->description,
|
||||
|
||||
Reference in New Issue
Block a user