@extends('layouts.admin') @section('content') @php $isPaid = $shipment->invoice && strtolower($shipment->invoice->status) === 'paid'; $exchangeRate = 950; // adjust NGN/GBP @endphp
{{-- Breadcrumb --}}
Shipments / Shipment #{{ $shipment->id }}
{{-- Currency Toggle --}}
{{-- Page Header --}}

Shipment — {{ $shipment->tracking_number }}

Receiver: {{ $shipment->receiver_name }}

{{-- Desktop Action Buttons --}} @if($isPaid)

🔒 Invoice is already paid; edit or delete is disabled.

@endif
{{-- Grid --}}
{{-- Receiver Info --}}

Receiver Information

Name: {{ $shipment->receiver_name }}

Address: {{ $shipment->receiver_address }}

Notes: {{ $shipment->notes ?? 'N/A' }}

{{-- Shipment Details --}}

Shipment Details

Tracking Number: {{ $shipment->tracking_number }}

Weight: {{ $shipment->weight }} kg

Customer ID: {{ $shipment->user_id }}

{{-- Pricing --}}

Pricing Breakdown

Original Price: ₦{{ number_format($shipment->original_price * $exchangeRate, 2) }}

Discount: ₦{{ number_format($shipment->discount_amount * $exchangeRate, 2) }}


Final Price: ₦{{ number_format($shipment->final_price * $exchangeRate, 2) }}

{{-- Payment Status --}}

Payment Status {{ $isPaid ? 'PAID' : 'UNPAID' }}

Invoice Number: {{ $shipment->invoice->payment_reference ?? 'Not Generated' }}

Amount Due: ₦{{ number_format($shipment->final_price * $exchangeRate, 2) }}

Payment Method: {{ $shipment->invoice->payment_method ?? 'N/A' }}

Payment Date: {{ $shipment->invoice->paid_at?->format('d M Y, h:i A') ?? 'Not Paid Yet' }}

{{-- Timeline --}}

Shipment Timeline

Created

{{ $shipment->created_at->format('d M Y — h:i A') }}

Last Updated

{{ $shipment->updated_at->format('d M Y — h:i A') }}

{{-- Back Button --}} {{-- Mobile Sticky Action Bar --}}
Edit @if($shipment->is_certified != 1)
@csrf
@endif
{{-- Delete Form --}}
@csrf @method('DELETE')
{{-- Currency Toggle Script --}} @endsection