@php $totalWorkedDays = $totalPH = $totalArrearsDays = $totalPaidDays = 0; $totalActualOT = $totalArrearsOT = $totalOT = 0; $totalEarnings = $totalDeductions = $totalNetPayable = 0; $totalEarningsComponent = []; $totalDeductionsComponent = []; foreach ($earningDerivedComponents as $component) { $totalEarningsComponent[$component->id] = 0; } foreach ($deductionDerivedComponents as $component) { $totalDeductionsComponent[$component->id] = 0; } @endphp @if ($contractor) @endif
Form No.II [See Rule 27(1)]
Register of Wages
{{ $organization->name ?? '' }} - {{ $organization->address->line_1 ?? '' }}
For the Month of {{ date('F', strtotime($month)) }} - {{ $year }}
Contractor: {{ $contractor->name }} Contractor Address: {{ $contractor->address->street ?? '' }}, {{ $contractor->address->city->name ?? '' }}, {{ $contractor->address->state->name ?? '' }}, {{ $contractor->address->country->name ?? '' }}
@foreach ($earningDerivedComponents as $component) @endforeach @foreach ($deductionDerivedComponents as $component) @endforeach @foreach ($employees as $index => $employee) @php $payrollProcess = new \App\Lib\Services\PayrollProcess(); $attendanceData = $payrollProcess->getPayrollAttendanceData( $organization, $employee, $month, $year, ); $atSummary = $employee->getAttendanceSummaryList($month, $year); $leavesData = $payrollProcess->getMonthlyLeaves($employee, $month, $year); $present = $attendanceData['present'] ?? 0; $absent = $attendanceData['absent'] ?? 0; $weekOff = $attendanceData['weekOffs'] ?? 0; $hd = $attendanceData['halfDays'] ?? 0; $co = $attendanceData['compensations'] ?? 0; $ph = $attendanceData['holidays'] ?? 0; $payDay = $attendanceData['totalPaidDays'] ?? 0; $totalPaidDay = $payDay + $co - ($ph + $hd) < 0 ? 0 : $payDay + $co - ($ph + $hd); $earningDerivedTotal = 0; $deductionDerivedTotal = 0; $slipLogs = isset($employee->salarySlip->slipLogs) ? $employee->salarySlip->slipLogs->pluck('calculate_salary', 'type_id') : []; @endphp @foreach ($earningDerivedComponents as $component) @php $earning = round($slipLogs[$component->id] ?? 0, 2); $earningDerivedTotal += $earning; $totalEarningsComponent[$component->id] += $earning; @endphp @endforeach @foreach ($deductionDerivedComponents as $component) @php $deduction = round($slipLogs[$component->id] ?? 0, 2); $deductionDerivedTotal += $deduction; $totalDeductionsComponent[$component->id] += $deduction; @endphp @endforeach @php $netPayable = $earningDerivedTotal - $deductionDerivedTotal; $totalWorkedDays += $present; $totalPH += $ph; $totalPaidDays += $totalPaidDay; $totalActualOT += $attendanceData['actualOT'] ?? 0; $totalArrearsOT += $attendanceData['arrearsOT'] ?? 0; $totalOT += $attendanceData['totalOT'] ?? 0; $totalEarnings += $earningDerivedTotal; $totalDeductions += $deductionDerivedTotal; $totalNetPayable += $netPayable; @endphp @endforeach @foreach ($earningDerivedComponents as $component) @endforeach @foreach ($deductionDerivedComponents as $component) @endforeach
Serial No ESIC No. UAN No. PF No. Emp Code Name of Worker Gender DOB DOJ Department Workstation Activity Education Category Worked Days PH Arrears days Total Paid Days Actual OT hrs Arrears OT hrs Total OT{{ $component->name ?? '-' }}Total Earnings{{ $component->name ?? '-' }}Total Deductions Net Payable
{{ $index + 1 }} {{ $employee->esic_no ?? '-' }} {{ $employee->uan_no ?? '-' }} {{ $employee->pf_no ?? '-' }} {{ $employee->employee_code ?? '-' }} {{ ucfirst($employee->name) ?? '-' }} {{ ucfirst($employee->gender) ?? '-' }} {{ $employee->dob ? date('d-m-Y', strtotime($employee->dob)) : '-' }} {{ $employee->date_of_joining ? date('d-m-Y', strtotime($employee->date_of_joining)) : '-' }} {{ isset($employee->department->name) ? ucfirst($employee->department->name) : '-' }} {{ isset($employee->workstation->name) ? ucfirst($employee->workstation->name) : '-' }} {{ isset($employee->designation->name) ? ucfirst($employee->designation->name) : '-' }} {{ $employee->education ?? '-' }} {{ isset($employee->category->name) ? ucfirst($employee->category->name) : '-' }} {{ $present }} {{ $ph }} {{ $arrearDays ?? 0 }} {{ round($totalPaidDay, 2) }} {{ $attendanceData['actualOT'] ?? 0 }} {{ $attendanceData['arrearsOT'] ?? 0 }} {{ $attendanceData['totalOT'] ?? 0 }}{{ $earning }}{{ round($earningDerivedTotal, 2) }}{{ $deduction }}{{ round($deductionDerivedTotal, 2) }}{{ round($netPayable, 2) }}
Total {{ round($totalWorkedDays, 2) }} {{ round($totalPH, 2) }} {{ round($totalArrearsDays, 2) }} {{ round($totalPaidDays, 2) }} {{ round($totalActualOT, 2) }} {{ round($totalArrearsOT, 2) }} {{ round($totalOT, 2) }}{{ round($totalEarningsComponent[$component->id], 2) }}{{ round($totalEarnings, 2) }}{{ round($totalDeductionsComponent[$component->id], 2) }}{{ round($totalDeductions, 2) }} {{ round($totalNetPayable, 2) }}
@php // dd(true); @endphp