@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
Request #{{ $req->id }} — @php $color = match($req->status) { 'pending' => 'warning', 'approved' => 'info', 'rejected' => 'danger', 'completed' => 'success', default => 'secondary' }; @endphp {{ strtoupper($req->status) }}

Employee: {{ $req->employee->name ?? $req->teacher->name ?? '--' }} ({{ $req->employee->e_id ?? $req->teacher->teacher_code ?? '--'}})

Requested: {{ number_format($req->requested_amount, 2) }}

Note: {{ $req->request_note ?? '—' }}

{{-- Approve/Reject --}} @php $canManageWithdrawal = auth()->check() && ( auth()->user()->hasAnyRole(['Admin', 'admin']) || auth()->user()->canAny(['Approve Withdrawals Request', 'Reject Withdrawals Request']) ); @endphp @if($canManageWithdrawal) @if($req->status === \App\Models\WithdrawalRequest::STATUS_PENDING)
Approval Actions
@if(auth()->check() && (auth()->user()->hasAnyRole(['Admin', 'admin']) || auth()->user()->can('Approve Withdrawals Request')))
@csrf
@endif @if(auth()->check() && (auth()->user()->hasAnyRole(['Admin', 'admin']) || auth()->user()->can('Reject Withdrawals Request')))
@csrf
@endif
@endif @endif {{-- Installment Table --}}
Installment Schedule
@forelse($req->schedules as $s) @empty @endforelse
# Due Date Amount Status Paid At Action
{{ $s->sequence_no }} {{ optional($s->due_date)->format('d M Y') }} {{ number_format($s->amount) }} {{ strtoupper($s->status) }} {{ $s->paid_at ? $s->paid_at->format('d M Y') : '—' }} @if($s->status === \App\Models\WithdrawalSchedule::STATUS_SCHEDULED && $req->status === \App\Models\WithdrawalRequest::STATUS_APPROVED)
@csrf
@endif
No schedules available.
{{-- Attachments --}}
Supporting Documents
@forelse($req->attachments as $att)

{{ $att->original_name }}

@empty

No files uploaded.

@endforelse
{{-- Provident Fund Summary --}}
Provident Fund Summary
@php $currentBalance = $account->current_balance ?? 0; $lockedBalance = $account->locked_balance ?? 0; $withdrawable = max(0, $currentBalance - $lockedBalance); @endphp
  • Current Balance {{ number_format($currentBalance, 2) }}
  • Locked Balance {{ number_format($lockedBalance, 2) }}
  • Withdrawable {{ number_format($withdrawable, 2) }}
@endsection