@extends('layouts.app') @section('title', 'Process Receiving Shipment') @push('styles') @endpush @section('content')

Shipment {{ $shipment->tracking_number ?? $shipment->id }}

Review the package details before processing.

Shipment details
Shipping Number
{{ $shipment->tracking_number ?? 'N/A' }}
Suite Number
{{ $shipment->suite_number ?? 'N/A' }}
Port of Destination
{{ $shipment->destinationLabel() }}
Cargo Type
{{ $shipment->cargoTypeLabel() }}
@if(filled($shipment->HAWBNumber))
HAWB Number
{{ $shipment->HAWBNumber }}
@endif @if($shipment->items->isNotEmpty())
Items
@foreach($shipment->items as $item) @endforeach
Item Name Item Description
{{ $item->item_name }} {{ $item->item_description ?: 'N/A' }}
@else
Item Name
{{ $shipment->item_name ?? 'N/A' }}
Item Description
{{ $shipment->item_description ?? 'N/A' }}
@endif @php $shipmentFigures = $shipment->shippingFigures(); @endphp @include('wuser.partials.shipping-figures', [ 'figureStyle' => 'info', 'notaxShipping' => $shipmentFigures['notax'], 'gstAmount' => $shipmentFigures['gst'], 'shippingTotal' => $shipmentFigures['shipping'], ]) @if($shipment->sender_name)
Sender Name
{{ $shipment->sender_name }}
@endif @if($shipment->sender_address)
Sender Address
{{ $shipment->sender_address }}
@endif @if($shipment->declared_value)
Declared value (USD)
${{ number_format($shipment->declared_value, 2) }}
@endif @if($shipment->declared_value_inr)
Declared value (INR)
₹{{ number_format($shipment->declared_value_inr, 2) }}
@endif @if($shipment->weight)
Weight
{{ $shipment->weight }}
@endif @if($shipment->dimensions)
Dimensions
{{ $shipment->dimensions }}
@endif
Status
@php $statusColors = [ 'item_reached_warehouse' => 'bg-info', 'item_arrived_at_warehouse' => 'bg-info', 'payment_link_generated' => 'bg-warning', 'payment_link_send' => 'bg-warning', 'payment_processed' => 'bg-success', 'shipped_from_warehouse' => 'bg-primary', 'item_dispatched_from_warehouse' => 'bg-primary', 'item_shipped' => 'bg-info', 'item_reached' => 'bg-secondary', 'reached_destination_airport' => 'bg-primary', 'pending_customs_excise_duty' => 'bg-warning', 'reached_local_partner' => 'bg-info', 'reached_final_destination' => 'bg-success', ]; $statusLabels = [ 'item_arrived_at_warehouse' => 'Item Arrived at Warehouse', 'payment_link_send' => 'Payment Link Send', 'payment_processed' => 'Payment Processed', 'item_dispatched_from_warehouse' => 'Item Dispatched from Warehouse', 'item_shipped' => 'Item Shipped', 'item_reached' => 'Item Reached', ]; $semanticBadge = ['green' => 'bg-success', 'blue' => 'bg-primary', 'grey' => 'bg-secondary', 'orange' => 'bg-warning']; $trackingStatusKey = is_array($currentStatusData ?? null) ? (string) ($currentStatusData['status'] ?? '') : ''; $statusLabel = ''; $statusBadgeClass = null; if (is_array($currentStatusData ?? null) && !empty($currentStatusData['display_status'])) { $statusLabel = $currentStatusData['display_status']; $c = $currentStatusData['color'] ?? null; if ($c !== null && $c !== '' && isset($semanticBadge[(string) $c])) { $statusBadgeClass = $semanticBadge[(string) $c]; } } if ($statusLabel === '') { $statusLabel = $statusLabels[$shipment->status] ?? ucfirst(str_replace('_', ' ', (string) ($shipment->status ?? 'N/A'))); } if ($statusBadgeClass === null || $statusBadgeClass === '') { if ($trackingStatusKey !== '' && isset($statusColors[$trackingStatusKey])) { $statusBadgeClass = $statusColors[$trackingStatusKey]; } else { $statusBadgeClass = $statusColors[$shipment->status] ?? 'bg-secondary'; } } $latestStatusAt = !empty($currentStatusData['status_date'] ?? null) ? \Carbon\Carbon::parse($currentStatusData['status_date']) : null; $latestStatusTz = is_array($currentStatusData ?? null) ? ($currentStatusData['time_zone_display_label'] ?? null) : null; @endphp {{ $statusLabel }} @php $shipmentStatusKey = strtoupper($trackingStatusKey); $shipmentStatusTitle = strtolower((string) $statusLabel); $isMailItemGenerated = $shipmentStatusKey === 'EMA' || strpos($shipmentStatusTitle, 'mail item generated') !== false; @endphp @if($isMailItemGenerated) @include('partials.mms-tracking-number', ['mmsTrackingNumber' => $trackingData['mms_tracking_number'] ?? null]) @endif @if($latestStatusAt)
{{ $latestStatusAt->format('d-m-Y H:i') }} @if($latestStatusTz)
{{ $latestStatusTz }}
@endif
@endif
Received At
@if($shipment->received_at) {{ $shipment->received_at->format('d-m-Y H:i') }}
Indian Standard Time
@else N/A @endif
@if($shipment->processed_at)
Processed At
{{ $shipment->processed_at->format('d-m-Y H:i') }}
@endif @if($shipment->notes)
Notes
{{ $shipment->notes }}
@endif @if(!empty($showGoToPayment)) @endif
@if($shipment->kuser)
Customer
Customer Name
{{ $shipment->kuser->name }}
Email
{{ $shipment->kuser->email }}
@if($shipment->kuser->profile)
Phone
{{ $shipment->kuser->profile->phone ?? 'N/A' }}
@endif
Address
{{ optional($shipment->virtualAddress)->formattedDeliveryAddress() ?: 'N/A' }}
@else
Customer not linked

Customer information not found. Please ensure the suite number is correct.

@endif
@if($shipment->photos && $shipment->photos->count() > 0)
Photos {{ $shipment->photos->count() }}
@foreach($shipment->photos as $photo)
@if($photo->photo_path) {{ $photo->photo_name ?? 'Photo' }} @endif @if($photo->photo_name || $photo->photo_description)
@if($photo->photo_name) {{ $photo->photo_name }} @endif @if($photo->photo_description)

{{ Str::limit($photo->photo_description, 80) }}

@endif
@endif
@endforeach
@endif
@endsection @push('scripts') @endpush