@php function formatTime($time) { return $time && $time != '00:00:00' ? date('H:i', strtotime($time)) : ''; } @endphp
@php $colspan = 3; // IN, OUT, Working Hours if ($hideColumns) { if ($attendanceColumns['overtime']) { $colspan++; } if ($attendanceColumns['pr']) { $colspan++; } if ($attendanceColumns['status']) { $colspan++; } } @endphp @foreach ($dateArr as $dates) @endforeach @if($showColumns) @endif @if($hideColumns) @if($hideOtPRfromComplianceExcel) @endif @if (in_array('total_week_off', $showWoHoArr))@endif @if (in_array('week_off', $showWoHoArr))@endif @if (in_array('extra_week_off', $showWoHoArr))@endif @if (in_array('shut_down', $showWoHoArr))@endif @if (in_array('total_holiday', $showWoHoArr))@endif @if (in_array('holiday', $showWoHoArr))@endif @if (in_array('national_holiday', $showWoHoArr))@endif @if (in_array('restricted_holiday', $showWoHoArr))@endif @endif @foreach ($dateArr as $dates) @if($attendanceColumns['overtime']) @endif @if($attendanceColumns['pr']) @endif @if($attendanceColumns['status']) @endif @endforeach @foreach ($employeeSummary as $key => $value) @php $totalPaidDays = $totalPresent = $overtime = $actualOvertime = $totalActualOvertime = $totalovertime = 0; $atSummary = $value->getAttendanceSummaryFilter($fromDate, $toDate); @endphp @foreach ($dateArr as $date) @php $attendance = $atSummary[$date] ?? null; $boxColor = ''; $autoWeekClass = ''; if ($attendance) { if ($attendance->remarks == App\Helpers\ConstantHelper::AUTO_WEEK_OFF) { $autoWeekClass = 'autoweekoff'; } if ($attendance->entry_mode == App\Helpers\ConstantHelper::REGULARIZED) { $boxColor = '#90EE90'; } elseif ($attendance->entry_mode == App\Helpers\ConstantHelper::MODIFIED) { $boxColor = '#87CEFA'; } } @endphp @php $hideTime = $attendance && $hideWeekoffFromExport &&( $attendance->on_duty == 2 || ($attendance->on_duty == 3 && $attendance->is_week_off == 0) || in_array(strtolower($attendance->attendance_type ?? ''), ['week_off','week-off','holiday']) ); @endphp @if($hideColumns) @if($attendanceColumns['overtime']) @endif @if($attendanceColumns['pr']) @endif @if($attendanceColumns['status']) @endif @endif @endforeach @if($showColumns) @php $present = @$value->vwAttendanceSummary->total_present ?? 0; $holiday = (@$value->woHoCounts['total_holiday'] ?? 0) + (@$value->woHoCounts['total_week_off'] ?? 0); $workingDays = $present + $holiday; @endphp @endif @if($hideColumns) @if($hideOtPRfromComplianceExcel) @endif @if (in_array('total_week_off', $showWoHoArr))@endif @if (in_array('week_off', $showWoHoArr))@endif @if (in_array('extra_week_off', $showWoHoArr))@endif @if (in_array('shut_down', $showWoHoArr))@endif @if (in_array('total_holiday', $showWoHoArr))@endif @if (in_array('holiday', $showWoHoArr))@endif @if (in_array('national_holiday', $showWoHoArr))@endif @if (in_array('restricted_holiday', $showWoHoArr))@endif @endif @endforeach