@extends('layouts.app') @section('title', 'POSM Shipment Details') @section('content')
Shipment: {{ $shipment->shipment_number }}
Shipment Information
Shipment No: {{ $shipment->shipment_number }}
Date: {{ $shipment->created_at->format('Y-m-d H:i') }}
Status: @php $badgeClass = match ($shipment->status) { 'pending' => 'secondary', 'approved_for_dispatch' => 'info', 'ready_to_dispatch' => 'warning', 'dispatched' => 'primary', 'received' => 'success', default => 'secondary' }; @endphp {{ str_replace('_', ' ', ucfirst($shipment->status)) }}
Depletion Plan: {{ $shipment->depletionPlan->plan_number ?? 'N/A' }}
Dispatched By: {{ $shipment->dispatchedBy->name ?? 'N/A' }}
Dispatched At: {{ $shipment->dispatched_at ? $shipment->dispatched_at->format('Y-m-d H:i') : 'N/A' }}
Distribution Details
From Warehouse: {{ $shipment->warehouse->name ?? 'N/A' }}
To (Distribution Point): {{ $shipment->distributionPoint->name ?? 'N/A' }}
Recipient Email: {{ $shipment->received_by_email ?? 'N/A' }}
Received At: {{ $shipment->received_at ? $shipment->received_at->format('Y-m-d H:i') : 'N/A' }}
Has Discrepancy: {{ $shipment->has_discrepancy ? 'Yes' : 'No' }}
Shipment Items
@foreach ($shipment->items as $index => $item) @endforeach
# Product Quantity
{{ $index + 1 }} {{ $item->product->name ?? 'N/A' }} {{ number_format($item->quantity, 0) }}
Total Quantity: {{ number_format($shipment->items->sum('quantity'), 0) }}
@endsection