@extends('layouts.app') @section('title', $customer->name . ' - Customer Profile') @section('content')
Back to Customers

{{ $customer->name }}

View Wallet Edit Customer
@csrf
Basic Information
{{ ucfirst($customer->customer_type) }}
@if($customer->phone) @endif @if($customer->full_address)
{{ $customer->full_address }}
@endif
{{ $customer->created_at->format('M d, Y') }}
@if($customer->first_purchase_at)
{{ $customer->first_purchase_at->format('M d, Y') }}
@endif @if($customer->last_purchase_at)
{{ $customer->last_purchase_at->diffForHumans() }}
@endif
Statistics

{{ $stats['total_orders'] }}

Orders

{{ $stats['total_bookings'] }}

Bookings

RM {{ number_format($stats['total_spent'], 2) }}

Total Spent

RM {{ number_format($stats['average_order_value'], 2) }}

Average Order Value
@if($customer->notes)
Internal Notes

{{ $customer->notes }}

@endif
Transaction History
@if($transactions->count() > 0)
@foreach($transactions as $transaction) @endforeach
Date Type Channel Reference Amount Status Payment Actions
{{ $transaction['date']->format('M d, Y') }} @if($transaction['type'] === 'order') Order @else Booking @endif {{ ucfirst($transaction['channel']) }} {{ $transaction['reference'] }} RM {{ number_format($transaction['amount'], 2) }} @php $statusClass = match($transaction['status']) { 'completed', 'confirmed' => 'success', 'pending' => 'warning', 'cancelled' => 'danger', default => 'secondary', }; @endphp {{ ucfirst($transaction['status']) }} @php $paymentClass = match($transaction['payment_status']) { 'paid' => 'success', 'pending' => 'warning', 'failed' => 'danger', default => 'secondary', }; @endphp {{ ucfirst($transaction['payment_status']) }} View
@else

No transactions yet

@endif
@endsection