@extends('admin.layouts.app') @section('page-title', 'Customer Details') @section('content')
{{-- HEADER - FIXED BUTTON POSITION --}} {{-- CUSTOMER PROFILE CARD --}}
{{ strtoupper(substr($customer->customer_name,0,1)) }}

{{ $customer->customer_name }}

@if($customer->customer_type == 'premium') Premium @else Regular @endif

{{ $customer->company_name ?? 'No company specified' }}

{{ ucfirst($customer->status) }} Joined {{ $customer->created_at ? $customer->created_at->format('M d, Y') : 'N/A' }}
{{-- CUSTOMER INFORMATION --}}
{{-- Contact Information --}}
Contact Information
Email: {{ $customer->email }}
Mobile: {{ $customer->mobile_no }}
Address: {{ $customer->address ?? 'N/A' }}
Pincode: {{ $customer->pincode ?? 'N/A' }}
{{-- Account Information --}}
Account Information
Customer ID: {{ $customer->customer_id }}
Registered On: {{ $customer->created_at ? $customer->created_at->format('d M, Y') : '-' }}
Designation: {{ $customer->designation ?? 'N/A' }}
{{-- STATISTICS --}}
{{-- Total Orders --}}
{{ $totalOrders }}
Total Orders
{{-- Total Amount --}}
₹{{ number_format($totalOrderAmount, 2) }}
Total Amount Spent
₹{{ number_format($totalPayable, 2) }}
Total Payable
₹{{ number_format($totalRemaining, 2) }}
Remaining Amount
{{-- Mark Count --}}
{{ $customer->marks->count() }}
Mark Numbers
{{-- MARK NUMBERS SECTION --}}
Customer Mark Numbers {{ $customer->marks->count() }}
@if($customer->marks->count() == 0)

No mark numbers found for this customer.

@else @foreach($customer->marks as $index => $mark)
{{ $mark->mark_no }}
{{ $mark->origin }} → {{ $mark->destination }}
@endforeach @endif
@endsection