@extends('layouts.app') @section('content')
@if(session('success')) @endif @if(session('error')) @endif @php $authUser = auth()->user(); $canEditWithdrawal = $authUser && ($authUser->account_type === 'super_admin' || $authUser->hasPermission('withdrawals', 'edit')); $profileImg = $user ? ($user->profile_image_thumb_url ?: $user->profile_image_url) : null; $countryCode = trim((string) ($user->phone_country_code ?? '')); $phoneFormatted = $user ? (($countryCode ? '+' . ltrim($countryCode, '+') . ' ' : '') . ($user->phone_no ?? '-')) : 'N/A'; $profileRoute = null; if ($user) { $profileRoute = $user->account_type === 'partner' ? ($authUser && $authUser->hasPermission('partners', 'view') && Route::has('admin.partners.show') ? route('admin.partners.show', $user->id) : null) : ($authUser && $authUser->hasPermission('users', 'view') && Route::has('users.view') ? route('users.view', $user->id) : null); } @endphp
User Information
@if($user)
@if($profileImg) {{ $user->name }} @else
{{ strtoupper(substr($user->name ?: 'U', 0, 1)) }}
@endif

{{ $user->name ?: 'User #' . $user->id }}

@if($user->account_type === 'partner') Partner @else User @endif
ID: #{{ $user->id }} • Member since {{ $user->created_at ? $user->created_at->format('d M Y') : '-' }}
@if($profileRoute) Full Profile @endif
Email Address
{{ $user->email ?: 'N/A' }}
Phone Number
{{ $phoneFormatted }}
Current Wallet Balance
{{ currency_symbol() }} {{ number_format((float) ($user->wallet_balance ?? 0), 2) }}
Account Status
{{ $user->status ?: 'Active' }}
@else
User account has been removed or does not exist.
@endif
Primary Bank Details
is_primary = 1
@if($primaryBank)
This is the user's Primary Account selected for payout transfers.
Account Holder Name
{{ $primaryBank->account_holder_name ?: '-' }}
Payment Method
@if($primaryBank->payment_method === 'upi') UPI Transfer @else Bank Transfer @endif
@if($primaryBank->bank_name)
Bank Name
{{ $primaryBank->bank_name }}
@endif @if($primaryBank->branch_name)
Branch Name
{{ $primaryBank->branch_name }}
@endif @if($primaryBank->account_number)
Account Number
{{ $primaryBank->account_number }}
@endif @if($primaryBank->ifsc_code)
IFSC Code
{{ $primaryBank->ifsc_code }}
@endif @if($primaryBank->upi_id)
UPI ID
{{ $primaryBank->upi_id }}
@endif @if($primaryBank->swift_code)
SWIFT Code
{{ $primaryBank->swift_code }}
@endif @if($primaryBank->iban)
IBAN
{{ $primaryBank->iban }}
@endif @if($primaryBank->routing_number)
Routing Number
{{ $primaryBank->routing_number }}
@endif @if($primaryBank->currency)
Currency
{{ $primaryBank->currency }}
@endif
@else
No Primary Bank Account!

The user has not set any bank account as primary in user_bank_details table.

@endif @if($otherBankAccounts && $otherBankAccounts->isNotEmpty())
Other Saved Accounts (Non-primary)
@foreach($otherBankAccounts as $other)
{{ $other->bank_name ?: ($other->upi_id ? 'UPI' : 'Bank Account') }} - {{ $other->account_holder_name }}
@if($other->account_number) A/C: ****{{ substr($other->account_number, -4) }} @endif @if($other->ifsc_code) • IFSC: {{ $other->ifsc_code }} @endif @if($other->upi_id) • UPI: {{ $other->upi_id }} @endif
Secondary
@endforeach
@endif
Withdrawal Request
Requested Amount
{{ currency_symbol() }} {{ number_format((float) $transaction->amount, 2) }}
{!! \App\Helpers\WidgetHelper::statusBadge($transaction->status) !!}
  • Transaction ID: #{{ $transaction->id }}
  • Type: {{ $transaction->type }} ({{ $transaction->refresh_type }})
  • Requested Date: {{ $transaction->created_at ? $transaction->created_at->format('d M Y, h:i A') : '-' }}
  • Last Updated: {{ $transaction->updated_at ? $transaction->updated_at->format('d M Y, h:i A') : '-' }}
  • @if($transaction->description)
  • Description:
    {{ $transaction->description }}
  • @endif @if(!empty(data_get($transaction->meta, 'admin_note')))
  • Admin Note:
    {{ data_get($transaction->meta, 'admin_note') }}
  • @endif @if(!empty($transaction->user_agent))
  • Request IP / Device:
    IP: {{ data_get($transaction->user_agent, 'ip', 'N/A') }}
    Browser: {{ data_get($transaction->user_agent, 'browser', data_get($transaction->user_agent, 'user_agent', 'N/A')) }}
  • @endif @if($transaction->getFirstMedia('image'))
  • Payment Proof:
  • @endif
@if($transaction->status === 'pending') @if($canEditWithdrawal)
Take Action (One-Time Only)
Important: This action can only be performed once. Once marked as Complete or Reject, the status cannot be changed again.
@csrf
@error('status')
{{ $message }}
@enderror
Marking as Complete will deduct {{ currency_symbol() }} {{ number_format((float) $transaction->amount, 2) }} from the user's wallet.
Marking as Reject will decline the request, and no wallet balance will be deducted.
Upload Payment Screenshot / Receipt
Click to browse or drag & drop (JPG, PNG, WEBP • Max 10MB)
Payment Receipt Preview
@error('image')
{{ $message }}
@enderror
When the decision is marked as Complete, this receipt image will be saved to the media library.
@endif @else
Decision Finalized
Status Locked
@if($transaction->status === 'completed')
Completed & Paid

This withdrawal request has been completed and the amount has been deducted from the user's wallet.

@else
Rejected / Failed

This withdrawal request was rejected. The user's wallet balance was not affected.

@endif
Final Status: {!! \App\Helpers\WidgetHelper::statusBadge($transaction->status) !!}
@if(!empty(data_get($transaction->meta, 'admin_note')))
Admin Remarks: {{ data_get($transaction->meta, 'admin_note') }}
@endif
Processed At: {{ $transaction->updated_at ? $transaction->updated_at->format('d M Y, h:i A') : '-' }}
@if($transaction->getFirstMedia('image')) @php $receipt = $transaction->getFirstMedia('image'); $receiptUrl = $receipt->getUrl(); @endphp
Payment Proof / Receipt Media Saved
{{ $receipt->file_name }}
{{ number_format($receipt->size / 1024, 1) }} KB
@endif
@endif
@if($transaction->getFirstMedia('image')) @endif @endsection