@php $role = session('login_role'); $rolePath = $role === 'staff' ? 'staff' : 'student'; $portal = $role === 'staff' ? 'STAFF PORTAL' : 'PATIENT PORTAL'; $displayRole = $role === 'staff' ? 'Staff' : 'Student'; $userName = $profile['full_name'] ?? session('login_name') ?? 'User'; $total = (float)($allocation['total_amount'] ?? 0); $used = (float)($allocation['used_amount'] ?? 0); $balance = (float)($allocation['balance_amount'] ?? ($total - $used)); $percent = $total > 0 ? round(($used / $total) * 100) : 0; @endphp Allocation Details

Allocation Details

{{ now()->format('D, d M Y') }}

Dental Allocation Overview

Track your annual dental allocation usage and treatment deductions.

{{ $percent }}%

Used
Total AllocationRM{{ number_format($total,2) }}
Used AmountRM{{ number_format($used,2) }}
RemainingRM{{ number_format($balance,2) }}

Current Balance

RM{{ number_format($balance,2) }}

← Back to Dashboard

Allocation Deduction History

{{ count($transactions ?? []) }} records
@if(count($transactions ?? []) > 0) @foreach($transactions as $t) @endforeach
Date Treatment Notes Amount Deducted
{{ !empty($t['treatment_date']) ? date('d M Y', strtotime($t['treatment_date'])) : '-' }} {{ $t['treatment_type'] ?? 'Dental Treatment' }} {{ $t['notes'] ?? '-' }} - RM{{ number_format((float)($t['amount'] ?? 0),2) }}
@else
No allocation deductions recorded yet.
@endif