{{-- ============================================================ admin/withdrawals/index.blade.php Author: Obrempong | Jcode ============================================================ --}} @extends('layouts.admin') @section('title','Withdrawals') @section('content') @php $pendingAmt = \App\Models\Withdrawal::where('status','pending')->sum('amount'); $paidAmt = \App\Models\Withdrawal::where('status','paid')->sum('net_amount'); $todayAmt = \App\Models\Withdrawal::where('status','paid')->whereDate('processed_at',today())->sum('net_amount'); $totalCount = \App\Models\Withdrawal::count(); @endphp
GH₵{{ number_format($pendingAmt,2) }}
Pending Amount
GH₵{{ number_format($paidAmt,2) }}
Total Paid Out
GH₵{{ number_format($todayAmt,2) }}
Paid Today
{{ number_format($totalCount) }}
Total Requests
Reset Export

Withdrawal Requests {{ $withdrawals->total() }}

@forelse($withdrawals as $w) @empty @endforelse
UserAmountMethodAccountScreenshotStatusDateActions
{{ $w->user->name }}
{{ $w->user->email }}
GH₵{{ number_format($w->net_amount,2) }}
{{ number_format($w->points_deducted) }} pts | Fee: GH₵{{ $w->fee }}
{{ strtoupper(str_replace('_',' ',$w->method)) }} {{ $w->account_name }}
{{ $w->account_number }}@if($w->bank_name)
{{ $w->bank_name }}@endif
@if($w->screenshot) View@elseNone@endif {{ ucfirst($w->status) }} @if($w->processed_at)
{{ $w->processed_at->format('d M H:i') }}@endif
{{ $w->created_at->format('d M Y') }}
{{ $w->created_at->format('H:i A') }}
@if($w->status==='pending')
@csrf
@elseif($w->status==='approved')
@csrf
@endif
No withdrawal requests found.
@endsection @push('scripts') @endpush