@if (!empty($contractorName)) @endif @if (!empty($locationName)) @endif @if (!empty($employeeType)) @endif @if (!empty($status)) @endif @if (!empty($departmentName)) @endif @if (count($empShifts)) @foreach ($empShifts as $shift) @endforeach @endif @foreach ($dateList as $date) @endforeach @foreach ($dateList as $date) @endforeach @foreach ($totalEmployees as $key => $employee) @php $payrollProcess = new \App\Lib\Services\PayrollProcess(); $attendanceData = $payrollProcess->getPayrollAttendanceData( $organization, $employee, $month, $year, ); $atSummary = $employee->getAttendanceSummaryList($month, $year); $daysActuallyWorked = 0; $lateDays = 0; $weekHolidays = 0; $totalMonthDays = date('t', strtotime($year . '-' . $month . '-01')); @endphp @foreach ($dateList as $date) @if (!isset($atSummary[$date])) @continue; @endif @php $attendance = isset($atSummary[$date]) ? $atSummary[$date] : null; @endphp @php $lateDays += $attendance->late_comer; $leavesData = $payrollProcess->getMonthlyLeaves( $employee, $month, $year, ); @endphp @endforeach @endforeach