@extends('layouts.admin') @php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', '?'); @endphp @section('title', 'Wallet Transactions') @section('header', 'Driver Wallet Transactions') @section('content')
Current Balance
{{ $currencySymbol }}{{ number_format($wallet->balance ?? 0, App\Models\AppSetting::currencyDecimals()) }}
Total Credit
{{ $currencySymbol }}{{ number_format($totalCredit, App\Models\AppSetting::currencyDecimals()) }}
Total Debit
{{ $currencySymbol }}{{ number_format(abs($totalDebit), App\Models\AppSetting::currencyDecimals()) }}
Net Change
{{ $netChange >= 0 ? '+' : '-' }}{{ $currencySymbol }}{{ number_format(abs($netChange), App\Models\AppSetting::currencyDecimals()) }}
{{ $creditDebitRatio !== null ? 'Credit/Debit ' . number_format($creditDebitRatio, App\Models\AppSetting::currencyDecimals()) . 'x' : 'No debit transactions yet' }}
Filters
Clear Filters
@forelse($transactions as $transaction) @empty @endforelse
Date Type Description Amount Balance After Reference
{{ $transaction->created_at->format('d M Y H:i') }} @php $typeClasses = [ 'topup' => 'success', 'credit' => 'success', 'refund' => 'warning', 'debit' => 'danger', ]; @endphp {{ $transaction->type }} {{ $transaction->description ?? '—' }} {{ in_array($transaction->type, ['credit', 'refund', 'topup']) ? '+' : '-' }}{{ $currencySymbol }}{{ number_format(abs($transaction->amount), App\Models\AppSetting::currencyDecimals()) }} {{ $currencySymbol }}{{ number_format($transaction->balance_after ?? 0, App\Models\AppSetting::currencyDecimals()) }} {{ $transaction->reference_type ?? '—' }} {{ $transaction->reference_id ? '#'.$transaction->reference_id : '' }}
No transactions found
{{ $transactions->withQueryString()->links() }}
@endsection