@if(strtolower((string) $shipmentPayment->payment_method) === 'pathway b')
Link: {{ $shipmentPayment->maldivianpost_link_status ?: 'Not sent' }}
@if($shipmentPayment->maldivianpost_link_date)
· {{ $shipmentPayment->maldivianpost_link_date->format('d M Y, h:i A') }}
@endif
Payment: {{ $shipmentPayment->maldivianpost_payment_status ?: 'Not completed' }}
@if($shipmentPayment->maldivianpost_payment_date)
· {{ $shipmentPayment->maldivianpost_payment_date->format('d M Y, h:i A') }}
@endif
@if(strtolower((string) $shipmentPayment->maldivianpost_payment_status) !== 'payment completed')
@endif
@php
$allShipments = $shipmentPayment->warehousePaymentShipments->map(function($wps) {
return $wps->shipment;
})->filter()->unique('id')->values();
if ($allShipments->isEmpty()) {
$shipment = $shipmentPayment->shipment;
if ($shipment) {
$allShipments = collect([$shipment]);
}
}
$firstShipment = $allShipments->first();
$latestTrackingStatus = $shipmentPayment->latestTrackingStatus;
$currentStatus = $latestTrackingStatus ? $latestTrackingStatus->status : null;
$currentDisplayStatus = $latestTrackingStatus ? $latestTrackingStatus->display_status : 'Unknown';
@endphp
Tracking Number
{{ $shipmentPayment->tracking_number ?? 'N/A' }}
Suite Number
{{ $firstShipment->suite_number ?? 'N/A' }}
Customer
{{ $firstShipment->kuser->profile->first_name ?? '' }} {{ $firstShipment->kuser->profile->last_name ?? '' }}
Payment Amount
₹{{ number_format($shipmentPayment->amount, 2) }}
Payment Status
{{ ucfirst($shipmentPayment->payment_status ?? 'pending') }}
Current Status
{{ $currentDisplayStatus }}
@if($allShipments->count() > 0)
Packages ({{ $allShipments->count() }}):
| Package # |
Sender |
Item Name |
Declared Value (USD) |
@foreach($allShipments as $index => $shipment)
| Package #{{ $index + 1 }} |
{{ $shipment->sender_name ?? '-' }} |
@if($shipment->item_name)
{{ $shipment->item_name }}
@elseif($shipment->item_description)
{{ $shipment->item_description }}
@else
-
@endif
|
@if($shipment->declared_value)
${{ number_format($shipment->declared_value, 2) }}
@else
-
@endif
|
@endforeach
@endif
@if($shipmentPayment->trackingStatuses && $shipmentPayment->trackingStatuses->count() > 0)
Tracking History:
@include('partials.mms-tracking-number', ['mmsTrackingNumber' => $shipmentPayment->activeMmsTrackingNumberList()])
| Status |
Description |
Date |
@foreach($shipmentPayment->trackingStatuses->sortBy('status_date') as $status)
|
{{ $status->display_status }}
|
{{ $status->description ?? '-' }} |
{{ $status->status_date ? $status->status_date->format('d M Y, h:i A') : '-' }} |
@endforeach
@endif
Current Status
@if($currentStatusInfo)
{{ $currentStatusInfo['display_status'] }}
{{ $currentStatusInfo['description'] }}
@if(isset($latestStatusDate) && $latestStatusDate)
Last updated: {{ \Carbon\Carbon::parse($latestStatusDate)->format('M d, Y H:i') }}
@endif
@else
Status information not available
@endif
@if(count($nextStatuses) > 0)
@else
This shipment has reached its final destination or no further status update is available.
@endif