|
@if (isset($_GET['page']) && $_GET['page'] > 0)
{{ ($_GET['page'] - 1) * 10 + $loop->iteration }}
@else
{{ $loop->iteration }}
@endif
|
{{ $value->name }} ({{ $value->employee_code }}) |
{{ @$value->department->name }} |
{{ @$value->SubDepartment->name }} |
@if (!$time)
{{ @$value->hod->name }} |
@endif
@foreach ($dateArr as $date)
@php
$attendance = $value->attendanceSummary->where('attendance_date', $date)->first();
@endphp
@if (!$attendance)
-
|
-
|
@continue;
@endif
@php
$overtime +=intval(substr($attendance->overtime, 0, -6)) * 60 + intval(substr($attendance->overtime, -5, -3));
$totalovertime = round($overtime / 60, 2);
$actualOvertime += intval(substr($attendance->actual_overtime, 0, -6)) * 60 + intval(substr($attendance->actual_overtime, -5, -3));
$totalActualOvertime = round($actualOvertime / 60, 2);
$autoWeekClass = $attendance->remarks == App\Helpers\ConstantHelper::AUTO_WEEK_OFF ? 'autoweekoff' : '';
$attendanceColors = [
'present' => 'bg-light-success',
'absent' => 'bg-light-danger',
'week-off' => 'bg-light-yellow',
'holiday' => 'bg-light-grey',
'leave' => 'bg-light-blue',
];
$boxColor = $attendanceColors[$attendance->attendance_type] ?? '';
if (round($attendance->day_count, 2) == 0.50 && $attendance->attendance_type=='present') {
$boxColor = 'bg-light-orange';
}
$entryModeColors = [
App\Helpers\ConstantHelper::REGULARIZED => 'bg-light-green',
App\Helpers\ConstantHelper::MODIFIED => 'bg-light-sky',
];
$boxColor = $entryModeColors[$attendance->entry_mode] ?? $boxColor;
$totalPaidDays += $attendance->day_count ?: 0;
if (
$attendance->attendance_type == 'present' &&
$attendance->on_duty == 1
) {
$totalPresent = $totalPresent + $attendance->day_count;
}
@endphp
{{ $time && !empty($attendance->in_time)
? date('H:i', strtotime($attendance->in_time))
: $attendance->first_half_status }}
@if ($attendance->first_half_status == 'L')
({{ strtoupper($attendance->leave_type) }})
@endif
|
{{ $time && !empty($attendance->out_time)
? date('H:i', strtotime($attendance->out_time))
: $attendance->second_half_status }}
@if ($attendance->second_half_status == 'L')
({{ strtoupper($attendance->leave_type) }})
@endif
|
@endforeach
{{ $totalPaidDays }} |
{{ $totalPresent }} |
{{ $woHoCounts['total_week_off'] }} |
{{ $woHoCounts['total_holiday'] }} |
{{ $totalActualOvertime }} |
{{ $totalovertime }} |
@if (!$time)
{{ preg_replace('/(\d{4})(\d{4})(\d{4})/', '$1 $2 $3', $value->aadhar_number) }}
|
{{ preg_replace('/(\d{4})(\d{4})(\d{4})/', '$1 $2 $3', $value->esic_no) }}
|
{{ preg_replace('/(\d{4})(\d{4})(\d{4})/', '$1 $2 $3', $value->uan_number) }}
|
{{ @$value->payroll_data['present'] }} |
{{ @$value->payroll_data['absent'] }} |
{{ @$value->payroll_data['leaves'] }} |
{{ @$value->payroll_data['unpaidLeaves'] }} |
{{ @$value->payroll_data['holidays'] }} |
{{ @$value->payroll_data['weekOffs'] }} |
{{ @$value->payroll_data['fineDays'] }} |
{{ @$value->additional_data['overtime_hours'] }} |
{{ @$value->additional_data['single_ot'] }} |
{{ @$value->additional_data['double_ot'] }} |
{{ @$value->additional_data['incentive_hours'] }} |
{{ @$value->additional_data['sunday_working_hours'] }} |
{{ @$value->additional_data['night_working_hours'] }} |
@php
$totalPayableSeconds = 0;
foreach ($value->attendanceSummary as $attendance) {
$timeParts = explode(':', $attendance->payable_hours);
if (count($timeParts) === 3) {
$hours = (int) $timeParts[0];
$minutes = (int) $timeParts[1];
$seconds = (int) $timeParts[2];
$totalPayableSeconds += ($hours * 3600) + ($minutes * 60) + $seconds;
}
}
$decimalPayableHours = $totalPayableSeconds / 3600;
@endphp
{{ number_format($decimalPayableHours, 2) }} |
@php
$totalProductiveSeconds = 0;
foreach ($value->attendanceSummary as $attendance) {
$timeParts = explode(':', $attendance->productive_hours);
if (count($timeParts) === 3) {
$hours = (int) $timeParts[0];
$minutes = (int) $timeParts[1];
$seconds = (int) $timeParts[2];
$totalProductiveSeconds += ($hours * 3600) + ($minutes * 60) + $seconds;
}
}
$decimalProductiveHours = $totalProductiveSeconds / 3600;
@endphp
{{ number_format($decimalProductiveHours, 2) }} |
{{ @$value->industrial_hours }} |
@foreach ($value->Leave_types as $leave)
@if (!empty($leave['taken_leaves']) || !empty($leave['balance_leaves']))
{{ strtoupper($leave['leaveType']) }}: {{ $leave['taken_leaves'] ?? '-' }}
Taken / {{ $leave['balance_leaves'] ?? '-' }} Balance
@else
-
@endif
|
@endforeach
@endif
@endforeach