{{ $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 = 1; @endphp @foreach($dates as $date) @php $reportRowVisiable = true; $attendence = $attendenceReport->where('attendenceDate', $date)->first(); if($generated_source != 'All' && !$attendence) { $reportRowVisiable = false; } @endphp @if($reportRowVisiable) @php $leaveStatus = @$leaves->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'; } @endphp @endif @endforeach
SL No. Date In Time Out Time Attendence Source Status Leave Status
{{ $slNo++ }} {{ 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 : '' }}