@php $addAttendancePermission = user()->permission('add_attendance'); $iteration = 0; @endphp
@lang('app.employee') @for ($i = 1; $i <= $daysInMonth; $i++) {{ $i }} @endfor @lang('app.total') @foreach ($employeeAttendence as $key => $attendance) @php $totalPresent = 0; $userId = explode('#', $key); $userId = $userId[0]; @endphp {!! end($attendance) !!} @foreach ($attendance as $key2 => $day) @if ($key2 + 1 <= count($attendance)) @php $attendanceDate = \Carbon\Carbon::parse($year.'-'.$month.'-'.$key2); @endphp @if ($day == 'Leave') @elseif ($day == 'Day Off') @elseif ($day == 'Half Day') @if ($attendanceDate->isFuture()) @else @endif @elseif ($day == 'Absent') @elseif ($day == 'Holiday') @else @if ($day != '-') @php $totalPresent = $totalPresent + 1; @endphp @endif {!! $day !!} @endif @endif @endforeach {{ array_key_exists($iteration, $total) ? $total[$iteration] : '0' }} @php $iteration++; @endphp @endforeach