@foreach ($leave_types as $leave_type)
@php
$totalCount = 0;
foreach ($leave_type->leaves as $leave) {
// Adjust count based on leave duration
$totalCount += ($leave->duration == 'half day') ? 0.5 : 1;
}
@endphp
@endforeach
@lang('modules.leaves.leaveType') |
@lang('app.date') |
@lang('modules.leaves.reason') |
@foreach ($leave_types as $item)
@foreach ($item->leaves as $key => $leave)
{!! $leave->duration == 'half day' ? '' . __('modules.leaves.halfDay') . '' : '' !!}
|
{{ $leave->leave_date->translatedFormat(company()->date_format) }}
|
{{ $leave->reason }}
|
@endforeach
@endforeach