Sin Yee requested for additional info to be included in arrived-parcel.xlsx

This commit is contained in:
Dillon Ngo
2026-08-06 12:01:43 +08:00
parent 390510e8aa
commit 6cc8283594
@@ -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,
];
}
}