@extends('layouts.app') @section('title', 'Customer Wallet') @section('content')

Customer Wallet

{{ $customer->name }} ({{ $customer->email }})

View Profile Back to Customers
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Current Balance

{{ number_format($stats['current_balance'], 0) }}

credits

Total Credits Added

{{ number_format($stats['total_credits_added'], 0) }}

Total Credits Spent

{{ number_format($stats['total_credits_spent'], 0) }}

Total Transactions

{{ number_format($stats['total_transactions']) }}

Manual Credit Adjustment
@csrf
@error('action')
{{ $message }}
@enderror
@error('amount')
{{ $message }}
@enderror
@error('reason')
{{ $message }}
@enderror
Transaction History
@if($transactions->count() > 0)
@foreach($transactions as $transaction) @endforeach
Date/Time Type Source Description Amount Balance After Related
{{ $transaction->created_at->format('M d, Y') }}
{{ $transaction->created_at->format('g:i A') }}
{{ $transaction->type === 'credit' ? 'Credit' : 'Debit' }} {{ ucfirst(str_replace('_', ' ', $transaction->source)) }} {{ $transaction->description ?? 'Transaction' }} @if($transaction->notes)
{{ $transaction->notes }} @endif
{{ $transaction->type === 'credit' ? '+' : '-' }}{{ number_format($transaction->amount, 2) }} {{ number_format($transaction->balance_after, 2) }} @if($transaction->order) Order #{{ $transaction->order->order_number }} @elseif($transaction->booking) Booking #{{ $transaction->booking->booking_reference }} @elseif($transaction->subscription) Subscription @elseif($transaction->credit_package_id) Package Purchase @else - @endif
{{ $transactions->links() }}
@else
No Transactions Yet

This customer has not made any wallet transactions

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush