@extends('layouts.layoutapp') @section('content')
Client Wallet

Manage wallet credits and reversals for {{ $client->user->name ?? '' }} {{ $client->user->last_name ?? '' }}

Back to Clients
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Client Details

Name: {{ $client->user->name ?? '' }} {{ $client->user->last_name ?? '' }}

Phone: {{ $client->user->phone ?? '' }}

Email: {{ $client->user->email ?? '' }}

Main Wallet Balance
{{ $walletBalance ?? 'Unavailable' }}
Wallet Reference

User ID: {{ $client->user_id }}

Credit Main Wallet
@csrf
Reverse Transaction
@csrf
@if (!empty($transactions)) @else @endif @error('transaction_no') {{ $message }} @enderror
Transaction History
@forelse ($transactions as $txn) @php $txnType = strtolower($txn['transaction_type'] ?? ''); $badgeClass = match ($txnType) { 'credit' => 'bg-success', 'debit' => 'bg-danger', 'reversal' => 'bg-warning', default => 'bg-secondary', }; @endphp @endforeach
Transaction No Type Amount Reference Remarks Date

{{ $txn['transaction_no'] ?? '-' }}

{{ strtoupper($txn['transaction_type'] ?? '-') }}

INR {{ number_format((float) ($txn['amount'] ?? 0), 2) }}

{{ $txn['reference_type'] ?? '' }} @if (!empty($txn['reference_id'])) #{{ $txn['reference_id'] }} @endif

{{ $txn['remarks'] ?? '-' }}

{{ isset($txn['created_at']) ? \Carbon\Carbon::parse($txn['created_at'])->format('d/m/Y H:i') : '-' }}

@if (!empty($balanceResponse))
Wallet Service Response
{{ json_encode($balanceResponse, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@endif
@endsection