@extends('layouts.dashboard') @section('content')
@if(session('success'))
โœ… {{ session('success') }}
@endif
โ† Back to Customers

{{ $customer->shop_name }}

{{ ucfirst($customer->status) }}

{{ $customer->customer_code }}

@if($customer->phone) ๐Ÿ“ž Call @endif @if($customer->whatsapp) @php $whatsapp = preg_replace('/\D+/', '', $customer->whatsapp); @endphp ๐Ÿ’ฌ WhatsApp @endif โœ๏ธ Edit
Orders
{{ number_format($orderStats['all']) }}
Draft Orders
{{ number_format($orderStats['draft']) }}
Confirmed Orders
{{ number_format($orderStats['confirmed']) }}
Confirmed Sales
AED {{ number_format($orderStats['sales_total'], 2) }}

๐Ÿงพ Recent Orders

@forelse($customer->orders as $order) @empty @endforelse
Order Status Items Total Date
{{ $order->order_number }} {{ ucfirst($order->status) }} {{ $order->items_count }} AED {{ number_format((float) $order->grand_total, 2) }} {{ $order->created_at?->format('d M Y') }} Open
No linked orders yet.
@if($customer->notes)

๐Ÿ“ Notes

{{ $customer->notes }}
@endif

๐Ÿ‘ค Contact

Contact Person
{{ $customer->contact_person ?: 'โ€”' }}
Phone
{{ $customer->phone ?: 'โ€”' }}
Email
{{ $customer->email ?: 'โ€”' }}

๐Ÿ“ Assignment & Location

Salesman
{{ $customer->salesman?->name ?: 'Unassigned' }}
Area
{{ $customer->area?->name ?: 'โ€”' }}
City
{{ $customer->city ?: 'โ€”' }}
Address
{{ $customer->address ?: 'โ€”' }}
@if($customer->google_maps_url) ๐Ÿ—บ Open Google Maps @elseif($customer->latitude && $customer->longitude) ๐Ÿ—บ Open Coordinates @endif

๐Ÿ’ณ Credit

Opening Balance
AED {{ number_format((float) $customer->opening_balance, 2) }}
Credit Limit
{{ $customer->credit_limit !== null ? 'AED '.number_format((float) $customer->credit_limit, 2) : 'โ€”' }}
Credit Days
{{ $customer->credit_days !== null ? $customer->credit_days.' days' : 'โ€”' }}
@endsection