{{ \Carbon\Carbon::parse('01-' . $month . '-' . $year)->translatedFormat('F-Y') }} @lang('app.menu.attendanceReport')
@for ($i = 1; $i <= $daysInMonth; $i++) @endfor @php $totalAbsent = 0; $totalLeaves = 0; $totalHalfDay = 0; $totalHoliday = 0; $allPresent = 0; @endphp @foreach ($employeeAttendence as $key => $attendance) @php $totalPresent = 0; $userId = explode('#', $key); $userId = $userId[0]; @endphp @foreach ($attendance as $key2 => $day) @if ($key2 + 1 <= count($attendance)) @php $attendanceDate = \Carbon\Carbon::parse($year.'-'.$month.'-'.$key2); @endphp @endif @endforeach @endforeach
@lang('app.employee'){{ $i }}
{{ $weekMap[\Carbon\Carbon::parse(\Carbon\Carbon::parse($i . '-' . $month . '-' . $year))->dayOfWeek] }}
@lang('app.total')
{!! end($attendance) !!} @if ($day == 'Leave') L @php $totalLeaves = $totalLeaves + 1; @endphp @elseif ($day == 'Half Day') HD @php $totalHalfDay = $totalHalfDay + 1; @endphp @elseif ($day == 'Absent') × @php $totalAbsent = $totalAbsent + 1; @endphp @elseif ($day == 'Holiday') @php $totalHoliday = $totalHoliday + 1; @endphp @else @if ($day != '-') @php $totalPresent = $totalPresent + 1; $allPresent = $allPresent + 1; @endphp @endif {!! $day !!} @endif {!! $totalPresent . ' / ' . (count($attendance) - 1) !!}
→ @lang('app.present') × → @lang('app.absent') → @lang('app.menu.holiday')
@lang('app.totalDays'): {{ $daysInMonth }} @lang('modules.attendance.daysPresent'): {{ $allPresent }} @lang('app.totalAbsent'): {{ $totalAbsent }}
@lang('app.totalLeave') : {{ $totalLeaves }} @lang('app.totalHalfDayLeave') : {{ $totalHalfDay }} L → @lang('app.menu.leaves')
@php $totalAbsent = 0; $totalHalfDay = 0; @endphp @foreach ($employeeAttendence as $key => $attendance) @php $totalAbsent = 0; $userId = explode('#', $key); $userId = $userId[0]; @endphp @foreach ($attendance as $key2 => $day) @if ($key2 + 1 <= count($attendance)) @if ($day == 'Absent') @php $totalAbsent = $totalAbsent + 1; @endphp @elseif ($day == 'Half Day') @php $totalHalfDay = $totalHalfDay + 0.5; @endphp @endif @endif @endforeach @php // Add half-day absences as fractions of full days $totalAbsent += $totalHalfDay; @endphp @endforeach
@lang('app.employee') @lang('app.totalAbsent')
{!! end($attendance) !!} {!! $totalAbsent . ' / ' . (count($attendance) - 1) !!}