| {{$res->empname}} |
|
{{$res->totAttendance}} |
{{$res->totalLate}} |
@php
$diff_in_days = $endDate->daysInMonth;
if($res->actualJoinDate !=null ){
$joiningDate = \Carbon\Carbon::parse($res->actualJoinDate);
if($joiningDate->year ==date('Y') && $joiningDate->month == date('m')){
$totalLeaveOrOff=($allLeave->where('fkEmployeeId',$res->employeeId)->whereIn('categoryCode',[LEAVE_CATEGORY['Casual'],LEAVE_CATEGORY['Sick'],LEAVE_CATEGORY['NoShift'],
LEAVE_CATEGORY['Marriage'],LEAVE_CATEGORY['Vacation'],LEAVE_CATEGORY['Leave with out pay'],LEAVE_CATEGORY['Team Leave']])->where('applicationStatus','Approved')->sum('noOfDays')
+array_sum($offday)+$joiningDate->day+array_sum($holidayarray));
echo $absent=((($diff_in_days-$res->totAttendance)-$totalLeaveOrOff));
}else{
$totalLeaveOrOff=($allLeave->where('fkEmployeeId',$res->employeeId)->whereIn('categoryCode',[LEAVE_CATEGORY['Casual'],LEAVE_CATEGORY['Sick'],LEAVE_CATEGORY['NoShift'],
LEAVE_CATEGORY['Marriage'],LEAVE_CATEGORY['Vacation'],LEAVE_CATEGORY['Leave with out pay'],LEAVE_CATEGORY['Team Leave']])->where('applicationStatus','Approved')->sum('noOfDays')
+array_sum($offday)+array_sum($holidayarray)
);
echo $absent=((($diff_in_days-$res->totAttendance)-$totalLeaveOrOff));
}
}else{
$totalLeaveOrOff=($allLeave->where('fkEmployeeId',$res->employeeId)->whereIn('categoryCode',[LEAVE_CATEGORY['Casual'],LEAVE_CATEGORY['Sick'],LEAVE_CATEGORY['NoShift'],
LEAVE_CATEGORY['Marriage'],LEAVE_CATEGORY['Vacation'],LEAVE_CATEGORY['Leave with out pay'],LEAVE_CATEGORY['Team Leave']])->where('applicationStatus','Approved')->sum('noOfDays')
+array_sum($offday)+array_sum($holidayarray)
);
echo $absent=((($diff_in_days-$res->totAttendance)-$totalLeaveOrOff));
}
@endphp
|
{{$allLeave->where('fkEmployeeId',$res->employeeId)->whereIn('categoryCode',[LEAVE_CATEGORY['Casual'],LEAVE_CATEGORY['Sick']])->where('applicationStatus','Approved')->sum('noOfDays')}} |
{{array_sum($offday)}}
|
{{array_sum($holidayarray)}}
|
{{$allLeave->where('fkEmployeeId',$res->employeeId)->where('categoryCode',LEAVE_CATEGORY['NoShift'])->where('applicationStatus','Approved')->sum('noOfDays')}} |
{{$allLeave->where('fkEmployeeId',$res->employeeId)->where('categoryCode',LEAVE_CATEGORY['Marriage'])->where('applicationStatus','Approved')->sum('noOfDays')}} |
{{$allLeave->where('fkEmployeeId',$res->employeeId)->where('categoryCode',LEAVE_CATEGORY['Leave with out pay'])->where('applicationStatus','Approved')->sum('noOfDays')}} |
0
|
0
|
{{$allLeave->where('fkEmployeeId',$res->employeeId)->where('categoryCode',LEAVE_CATEGORY['Team Leave'])->where('applicationStatus','Approved')->sum('noOfDays')}} |
|
@foreach($comments->where('fkemployeeId',$res->employeeId) as $comment)
{{$comment->comment}}
@endforeach
|
@endforeach