|
@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'
: '';
if (
$attendance->entry_mode ==
App\Helpers\ConstantHelper::REGULARIZED
) {
$boxColor = 'bg-light-green';
} elseif (
$attendance->entry_mode == App\Helpers\ConstantHelper::MODIFIED
) {
$boxColor = 'bg-light-sky';
} else {
$boxColor = '';
}
$totalPaidDays += $attendance->day_count ?: 0;
if (
$attendance->attendance_type == 'present' &&
$attendance->on_duty == 1
) {
$totalPresent = $totalPresent + $attendance->day_count;
}
@endphp
{{ $time && $attendance->in_time != '00:00:00'
? date('H:i', strtotime($attendance->in_time))
: $attendance->status }}
@if ($attendance->status == 'L')
({{ strtoupper($attendance->leave_type) }})
@endif
|
{{--
{{ $time && $attendance->out_time != '00:00:00'
? 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 }} |
{{ $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