@extends('app-new') @push('head-script') @endpush @push('content-header')
@endpush @push('prev-next-head')| @foreach($dateList as $date) | {{date('d-M (D)', strtotime($date))}} | @endforeach|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Employee Name | Department | Locations | Absent | Leaves | Paid Leaves | Unpaid Leaves | Fine Days | Pay Days | @foreach($dateList as $date)H1 | H2 | @endforeach||
| {{$employee->name}} ({{$employee->employee_code}}) |
{{@$employee->department->name}} | @php $mappedLocations = @$employee->locations->pluck('name')->toArray(); @endphp {{ implode(',', $mappedLocations) }} | @php $isDisabled = ''; if($employee->payrollAttendance && $employee->payrollAttendance->is_lock=="Yes"){ $isDisabled = 'disabled'; } $attendanceData = (new \App\Lib\Services\PayrollProcess)->getPayrollAttendanceByDate($organization, $employee, $fromDateSm, $toDateSm); @endphp{{ @$attendanceData['absent'] ?: 0}} | {{ @$attendanceData['leaves'] ?: 0}} | {{ @$attendanceData['paidLeaves'] ?: 0}} | {{ @$attendanceData['unpaidLeaves'] ?: 0}} | {{ @$attendanceData['fineDays'] ?: 0}} | {{ @$attendanceData['totalPaidDays'] ?: 0}} | @foreach($dateList as $date) @php $attendance = $employee->attendanceSummary->where('attendance_date', $date)->first(); @endphp @if(!$attendance)-- | -- | @continue; @endif @php $bgColor1 = 'bg-light-danger'; $bgColor2 = 'bg-light-danger'; if($attendance->first_half_status == 'P'){ $bgColor1 = 'bg-light-success'; } else if($attendance->first_half_status == 'PO'){ $bgColor1 = 'bg-light-info'; } if($attendance->first_half_status == 'L' || $attendance->on_duty == 4){ $bgColor1 = 'bg-light-warning'; } if($attendance->first_half_status == 'H' || $attendance->on_duty == 3){ $bgColor1 = 'bg-light-primary'; } if($attendance->first_half_status == 'WO' || $attendance->on_duty == 2){ $bgColor1 = 'bg-light-secondary'; } if($attendance->second_half_status == 'P'){ $bgColor2 = 'bg-light-success'; } else if($attendance->second_half_status == 'PO'){ $bgColor2 = 'bg-light-info'; } if($attendance->second_half_status == 'L' || $attendance->on_duty == 4){ $bgColor2 = 'bg-light-warning'; } if($attendance->second_half_status == 'H' || $attendance->on_duty == 3){ $bgColor2 = 'bg-light-primary'; } if($attendance->second_half_status == 'WO' || $attendance->on_duty == 2){ $bgColor2 = 'bg-light-secondary'; } @endphp@if(Auth::user()->hasPermission('/attendance-register-edit')) @endif {{ ($attendance->in_time!='00:00:00') ? Carbon\Carbon::parse( $attendance->in_time)->format('H:i ') : '--' }} | @if(Auth::user()->hasPermission('/attendance-register-edit')) @endif {{ ($attendance->out_time!='00:00:00') ? Carbon\Carbon::parse( $attendance->out_time)->format('H:i') : '--' }} | @endforeach