@if (!$time) @endif @if (!$time) @endif @foreach ($dateArr as $dates) @if ($time) @endif @endforeach @if (!$time) @php $maxLeaveCount = 0; foreach ($employeeSummary as $value) { $count = count($value->Leave_types ?? []); if ($count > $maxLeaveCount) { $maxLeaveCount = $count; } } @endphp @endif @foreach ($employeeSummary as $key => $value) @php $totalPaidDays = $totalPresent = $overtime = $actualOvertime = $totalActualOvertime = $totalovertime = 0; $atSummary = $value->getAttendanceSummaryFilter($fromDate, $toDate); @endphp @if (!$time) @endif @if (!$time) @endif @foreach ($dateArr as $date) @if (!isset($atSummary[$date])) @if ($time) @endif @continue; @endif @php $attendance = isset($atSummary[$date]) ? $atSummary[$date] : null; $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); $totalPaidDays += $attendance->day_count ?: 0; if ( $attendance->attendance_type == 'present' && $attendance->on_duty == 1 ) { $totalPresent = $totalPresent + $attendance->day_count; } @endphp @if ($time) @endif @endforeach @if (!$time) @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; } } // Convert to decimal hours $decimalPayableHours = $totalPayableSeconds / 3600; @endphp @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; } } // Convert total seconds to decimal hours $decimalProductiveHours = $totalProductiveSeconds / 3600; @endphp @foreach ($value->Leave_types as $leave) @endforeach @endif @endforeach
{{ $organization->name }} Day Summary Report - {{ $month_name }} {{ $year_id }}
S.No {{ trans('employee/employee.device_person') }} {{ trans('employee/employee.employee_code') }} {{ trans('employee/employee.employee_name') }}{{ trans('Manager') }}{{ trans('employee/employee.work_station_id') }} {{ trans('master/master.department') }} {{ trans('master/master.sub_department') }} {{ trans('master/master.employee_type') }} {{ trans('employee/employee.date_of_joining') }} {{ trans('employee/employee.designation') }} {{ trans('employee/employee.aadhar_number') }}{{ trans('Esic Number') }} {{ trans('UAN Number') }} {{ trans('Present') }} {{ trans('Absent') }} {{ trans('Leave') }} {{ trans('Unpaid Leave') }} {{ trans('Holidays') }} {{ trans('Week Offs') }} {{ trans('Fine Days') }}{{ trans('master/master.status') }}{{ date('d', strtotime($dates)) }} {{ trans('master/master.working_hour_time') }} {{ trans('master/master.working_hour_hrs') }} {{ trans('master/master.actual_ot_time') }} {{ trans('master/master.actual_ot_hrs') }} {{ trans('master/master.approved_ot_time') }} {{ trans('master/master.approved_ot_hrs') }} {{ trans('master/master.final_status') }}{{ trans('master/master.total_paid_days') }} {{ trans('master/master.total_duty') }} {{ trans('master/master.total_actual_ot') }}({{ trans('master/master.hours') }}) {{ trans('master/master.total_ot') }}({{ trans('master/master.hours') }}) {{ trans('Total Overtime') }} {{ trans('single OT') }} {{ trans('double Ot') }} {{ trans('Incentive Hours') }} {{ trans('Working Hour(Sunday)') }} {{ trans('Working Hours(Nights)') }} {{ trans('Payable Hours') }} {{ trans('Productive Hours') }} {{ trans('Industrial Hours') }} Leaves types
{{ $loop->iteration }} {{ $value->device_person_id }} {{ $value->employee_code }} {{ $value->name }}{{ @$value->hod->name }}{{ @$value->workstation->name }} {{ @$value->department->name }} {{ @$value->subDepartment->name }} {{ $value->employee_type }} {{ $value->date_of_joining ? date('d-m-Y', strtotime($value->date_of_joining)) : '' }} {{ @$value->designation->name }} {{ 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->status }} - - - - - - - - - {{ $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 {{ $attendance->working_time && $attendance->working_time != '00:00:00' ? \App\Helpers\GeneralHelper::formatToHi($attendance->working_time) : '-' }} {{ $attendance->working_time && $attendance->working_time != '00:00:00' ? App\Helpers\GeneralHelper::convertTimeToHours($attendance->working_time) : '-' }} {{ $attendance->actual_overtime && $attendance->actual_overtime != '00:00:00' ? \App\Helpers\GeneralHelper::formatToHi($attendance->actual_overtime) : '-' }} {{ $attendance->actual_overtime && $attendance->actual_overtime != '00:00:00' ? App\Helpers\GeneralHelper::convertTimeToHours($attendance->actual_overtime) : '-' }} {{ $attendance->overtime && $attendance->overtime != '00:00:00' ? \App\Helpers\GeneralHelper::formatToHi($attendance->overtime) : '-' }} {{ $attendance->overtime && $attendance->overtime != '00:00:00' ? App\Helpers\GeneralHelper::convertTimeToHours($attendance->overtime) : '-' }} {{ $attendance->status ? $attendance->status : '-' }} {{ $totalPaidDays }} {{ $totalPresent }} {{ $totalActualOvertime }} {{ $totalovertime }}{{ @$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'] }}{{ number_format($decimalPayableHours, 2) }}{{ number_format($decimalProductiveHours, 2) }} {{ @$value->industrial_hours }} @if (!empty($leave['taken_leaves']) || !empty($leave['balance_leaves'])) {{ strtoupper($leave['leaveType']) }}: {{ $leave['taken_leaves'] ?? '-' }} Taken / {{ $leave['balance_leaves'] ?? '-' }} Balance @else - @endif