@extends('admin.layouts.app') @section('title', 'Withdrawals') @section('content')

Withdrawals

{{-- Excel --}} Export Excel {{-- PDF --}} Export PDF
{{-- Success Message --}} @if (session('success')) @endif {{-- Error Message --}} @if (session('error')) @endif
@forelse ($withdrawals as $index => $withdrawal) @php $details = $withdrawal->payment_details ?? []; @endphp {{-- # --}} {{-- User --}} {{-- Amount --}} {{-- Payment Method --}} {{-- Payment Details --}} {{-- Requested On --}} {{-- Status --}} {{-- Action --}} @empty @endforelse
# User Amount Method Payment Details Requested On Status Action
{{ $withdrawals->firstItem() + $loop->index }} {{ $withdrawal->user->name ?? 'Unknown' }}
{{ $withdrawal->user->email ?? '' }}
₹{{ number_format($withdrawal->amount, 2) }} @if ($withdrawal->payment_method === 'UPI') UPI @else Bank Transfer @endif @if ($withdrawal->payment_method === 'UPI') {{-- UPI ID --}}
UPI ID {{ $details['upi_id'] ?? 'N/A' }}
{{-- QR Code --}}
QR Code @if (!empty($details['upi_qr'])) UPI QR Code @else QR not available @endif
@elseif($withdrawal->payment_method === 'Bank Transfer') {{-- Account Holder --}}
Holder: {{ $details['account_holder_name'] ?? 'N/A' }}
{{-- Account Number --}}
Account: {{ $details['account_number'] ?? 'N/A' }}
{{-- IFSC --}}
IFSC: {{ $details['ifsc'] ?? 'N/A' }}
{{-- Branch --}}
Branch: {{ $details['branch'] ?? 'N/A' }}
QR Code @if (!empty($details['passbook_image'])) UPI QR Code @else passbook image not available @endif
@else No payment details available. @endif
{{ $withdrawal->created_at->format('d M Y') }}
{{ $withdrawal->created_at->format('h:i A') }}
@if ($withdrawal->status == 'pending') Pending @elseif ($withdrawal->status == 'approved') Approved @elseif ($withdrawal->status == 'paid') Paid @elseif ($withdrawal->status == 'rejected') Rejected @endif @if ($withdrawal->status == 'pending') {{-- Approve --}}
@csrf @method('PUT')
{{-- Reject --}}
@csrf @method('PUT')
@elseif ($withdrawal->status == 'approved' || 'paid') @elseif ($withdrawal->status == 'rejected') Rejected @endif
No withdrawals requested yet.
{{-- Pagination --}}
{{ $withdrawals->links() }}
{{-- Action Modals --}} @foreach ($withdrawals as $withdrawal) @if ($withdrawal->status == 'approved') @endif @endforeach {{-- view qr image modal --}} {{-- view passbook image modal --}} {{-- view action modal --}} {{-- to update withdrawal status js --}} @endsection