Attendance Details Report
{{ $report_headers['company'] }}
{{ $report_headers['branch'] }}

{{ $report_headers['company_address'] }}

Branch: {{ $report_headers['branch'] }} Reporting Date: {{ $report_headers['reportOn'] }}
Employee: {{ $report_headers['employee'] }} Print Date: {{ date('d-m-Y H:i A') }}
@php $slNo = 0; $lateCount =0; @endphp @php $breakLine = collect($dates)->count(); @endphp @foreach($employeeInfo as $key=>$employee) @foreach($dates as $date) @php $reportRowVisiable = true; $attendence = $attendenceLogs->where('employee_id', $employee->id)->where('attendenceDate', $date)->first(); if($generated_source != 'All' && !$attendence) { $reportRowVisiable = false; } @endphp @if($reportRowVisiable) @php $leaveStatus = @$leaves->where('emp_id_fk', $employee->id) ->where('from_date', '<=', $date) ->where('to_date', '>=', $date) ->first()->name; $isHoliday = in_array($date, $holiDays); if($attendence) { if (strtotime($setting_time) > strtotime(date('h:i A', strtotime($attendence->entryTime)))) { $status = 'Present'; } else { $absent_time = strtotime($setting_time . '+3hours'); if (strtotime(date('h:i A', strtotime($attendence->entryTime))) > $absent_time) { $status = 'Absent'; } else { $status = 'Late'; } } } else if($isHoliday) { $status = 'Holiday'; } else { $status = 'Absent'; } $slNo++; $br = $slNo % $breakLine; @endphp @php if($status === 'Late'){ $lateCount++; } @endphp @if(($br+1) == 1 ) @php $lateCount=0; @endphp @endif @endif @endforeach @endforeach
SL No. Employee Name Employee ID Date In Time Out Time Attendence Source Status Leave Status
{{ $slNo }} {{ $employee->emp_name_english }} {{ $employee->emp_id }} {{ date('d-m-Y', strtotime($date)) }} {{ ($attendence && $attendence->entryTime && $attendence->entryTime != '00:00:00') ? date('h:i A', strtotime($attendence->entryTime)) : '--' }} {{ ($attendence && $attendence->exitTime && $attendence->exitTime != '00:00:00') ? date('h:i A', strtotime($attendence->exitTime)) : '--' }} {{ ($attendence) ? $attendence->attendenceSource : '' }} {{ ($generated_source == 'All') ? $status : '' }} {{ ($generated_source == 'All') ? $leaveStatus : '' }}
Total Late {{ $lateCount }}