Logo
Expense Type
@foreach($type_title as $expense) @endforeach
Expense Title
@foreach($type_title as $expense) {{-- Loop through children (titles) under each expense type --}} @endforeach
Department {{ $department }} Total Pages {{ $total_pages }} From {{ $from_date }} Printed On {{ $printed_on }}
{{-- Dynamically loop through type_title for grouping expense types and titles --}} @foreach($type_title as $expense) @endforeach {{-- Loop through titles --}} @foreach($type_title as $expense) @foreach($expense['children'] as $child) @endforeach @endforeach {{-- Add entitlement and usage columns --}} @foreach($type_title as $expense) @foreach($expense['children'] as $child) @endforeach @endforeach @foreach($expenses as $expense) {{-- Dynamically generate entitlement and usage columns --}} @foreach($type_title as $type) @foreach($type['children'] as $child) {{-- Adjusting the key formation to match the expected key format --}} @php $key_title = strtolower($child['title']); @endphp @endforeach @endforeach @endforeach
Sr. No Emp ID Client ID Emp Name Designation Department{{ strtoupper($expense['type']) }}
{{ strtoupper($child['title']) }}
Entitlement Usage
{{ $expense['sr_no'] }} {{ $expense['emp_id'] }} {{ $expense['client_id'] }} {{ $expense['emp_name'] }} {{ $expense['designation'] }} {{ $expense['department'] }}{{ is_numeric($expense[$key_title . '_entitlement'] ?? null) ? number_format($expense[$key_title . '_entitlement'], 0) : $expense[$key_title . '_entitlement'] }} {{ is_numeric($expense[$key_title . '_usage'] ?? null) ? number_format($expense[$key_title . '_usage'], 0) : $expense[$key_title . '_usage'] }}