@extends('backend.report.layouts.master', ['headerData' => $headerData,'printIt' => 1]) @section('extraStyle') @endsection @section('reportBody')
@foreach($monthDates as $date => $value) @endforeach @php $dayWisePresent = []; $dayWiseAbsent = []; //init 0 values foreach($monthDates as $date => $value){ $dayWisePresent[$date] = 0; $dayWiseAbsent[$date] = 0; } @endphp @foreach($employees as $employee) @if(isset($attendanceData[$employee->id])) @php $tPresent = 0; $tabsent = 0; @endphp @foreach($monthDates as $date => $value) @php $status = ''; $color = ''; if(isset($attendanceData[$employee->id][$date])) { if($attendanceData[$employee->id][$date]['present'] == 1){ $status = 'P'; $color = 'green'; $tPresent++; if($value['weekend'] || isset($calendarData[$date])){ $tPresent--; } $dayWisePresent[$date] += 1; } else{ if(!isset($employeesLeaves[$employee->id][$date]) && !isset($calendarData[$date]) && !$value['weekend'] ){ $status = 'A'; $tabsent++; $color = 'red'; $dayWiseAbsent[$date] += 1; } } } if($value['weekend']){ $status .= 'W'; $color = 'weekend'; $tPresent++; } if(isset($employeesLeaves[$employee->id][$date])) { $status = 'L'; $color = 'blue'; $tPresent++; } @endphp @endforeach @endif @endforeach {!! ReportHelper::generateEmployeeMonthlyAttendanceSumTableRows($dayWisePresent,$dayWiseAbsent) !!}
SL NAME Day of Month Present Absent ToT.DAYS
{{$value['day']}}
{{$loop->iteration}} {{$employee->name}}{{$status}} {{($tPresent)}} {{$tabsent}} {{$tPresent + $tabsent}}
Printed By: {{auth()->user()->name}}
@endsection