@extends('layouts.app') @section('title', 'Customer Details') @section('page-title', 'Customer Management') @section('content')
{{ substr($customer->name, 0, 1) }}

{{ $customer->name }}

{{ $customer->company_name ?? 'Individual' }} {{ $customer->is_active ? 'Active' : 'Inactive' }}

Total Bookings

{{ $stats['total_bookings'] }}

Total Spent

{{ \App\Helpers\CurrencyHelper::format($stats['total_amount']) }}

Total Paid

{{ \App\Helpers\CurrencyHelper::format($stats['total_paid']) }}

Outstanding Due

{{ \App\Helpers\CurrencyHelper::format($stats['total_due']) }}

Contact Details

Email

{{ $customer->email }}

Phone

{{ $customer->phone }}

CNIC

{{ $customer->cnic ?? 'N/A' }}

Address

Address

{{ $customer->address }}

City

{{ $customer->city }}

State

{{ $customer->state }}

Postal Code

{{ $customer->postal_code }}

Country

{{ $customer->country }}

@if($customer->notes)

Notes

{{ $customer->notes }}

@endif

Recent Shipments & Invoices

Last 10 Records
@forelse($bookings as $booking) @empty @endforelse
CNTR / Date Route Amount Status Action
{{ $booking->cntr_no }}
{{ $booking->booking_date->format('d M, Y') }}
{{ $booking->pickup_location }}
{{ $booking->delivery_location }}
{{ \App\Helpers\CurrencyHelper::format($booking->total_amount) }}
@if($booking->due_payment > 0)
Due: {{ \App\Helpers\CurrencyHelper::format($booking->due_payment) }}
@else
Paid
@endif
@php $statusClasses = [ 'Pending' => 'bg-yellow-100 text-yellow-800', 'Loaded' => 'bg-blue-100 text-blue-800', 'In Transit' => 'bg-indigo-100 text-indigo-800', 'Arrived' => 'bg-purple-100 text-purple-800', 'Delivered' => 'bg-green-100 text-green-800', 'Damaged' => 'bg-red-100 text-red-800', ]; $class = $statusClasses[$booking->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $booking->status }}

No shipment history found.

@if($bookings->hasPages())
{{ $bookings->links() }}
@endif
@endsection