@php $walletBalanceDisplay = (float) ($walletBalance ?? 0); $walletStatusDisplay = (string) ($walletStatusLabel ?? $loan_client->wallet?->status ?? 'active'); @endphp

Wallet

@if(auth()->user()?->hasLoanPermission('wallets.view') && \Illuminate\Support\Facades\Route::has('loan.clients.wallet.statement')) Export statement @endif @if(auth()->user()?->hasLoanPermission('wallets.pay_loan') && $walletBalanceDisplay > 0.01 && ($loan_client->wallet?->status ?? '') === \App\Models\ClientWallet::STATUS_ACTIVE) @endif @if(auth()->user()?->hasLoanPermission('wallets.refund_request') && $walletBalanceDisplay > 0.01) @endif
Current balance

KSh {{ number_format($walletBalanceDisplay, 2) }}

Total credits

KSh {{ number_format((float) ($walletTotals['credits'] ?? 0), 2) }}

Total debits

KSh {{ number_format((float) ($walletTotals['debits'] ?? 0), 2) }}

Status

{{ ucfirst($walletStatusDisplay) }}

@if(auth()->user()?->hasLoanPermission('wallets.adjust') && \Illuminate\Support\Facades\Route::has('loan.clients.wallet.adjust'))
@csrf

Manual adjustment

@endif
@forelse(($walletStatement ?? collect()) as $tx) @empty @endforelse
Date Type Description Credit Debit Balance
{{ optional($tx->created_at)->format('Y-m-d H:i') }} {{ $tx->transaction_type }} {{ $tx->description ?? '—' }} {{ $tx->transaction_type === 'credit' ? number_format((float) $tx->amount, 2) : '—' }} {{ $tx->transaction_type === 'debit' ? number_format((float) $tx->amount, 2) : '—' }} {{ number_format((float) $tx->running_balance, 2) }}
No wallet transactions yet.