mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use Carbon\Carbon;
|
||||
@@ -38,7 +39,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
'Received Date',
|
||||
'Recorded On',
|
||||
'Days to Record',
|
||||
'Remarks'
|
||||
'Remarks',
|
||||
'Delivery Address',
|
||||
'Post Code',
|
||||
'State',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -79,6 +83,8 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
$recorded_on = $packingList->created_at->format('d-m-Y');
|
||||
$days_to_record = Carbon::parse($arrival_date)->diffInDays(Carbon::parse($recorded_on));
|
||||
|
||||
$address = $order->addresses()->where('status', '=', ApprovalStatus::APPROVED)->first();
|
||||
|
||||
return [
|
||||
$packingList->owner->reference,
|
||||
$marking,
|
||||
@@ -89,7 +95,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
$arrival_date,
|
||||
$recorded_on,
|
||||
$days_to_record,
|
||||
''
|
||||
'',
|
||||
$address->street_one . ' ' . ($address->street_two ? $address->street_two : '') . ', ' . $address->district->name,
|
||||
$address->postcode,
|
||||
$address->state->name,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user