@php $totalColumns = 9 + // Employee Info 4 + // Rate of Wage 2 + // OT Hours + Total Paid Days (count($payrollComponentHeads5) + 2) + // Earnings (count($payrollComponentHeads6) + 1) + // Deductions 1; // Net Payment @endphp {{-- Column Heading --}} {{-- Rate of Wage --}} @foreach ($payrollComponentHeads5 as $component) @if(in_array($component->id, [3715, 3716, 3717])) @endif @endforeach {{-- Earning --}} @foreach ($payrollComponentHeads5 as $component) @if ($component->id == 3717) @endif @endforeach {{-- Deduction --}} @foreach ($payrollComponentHeads6 as $component) @endforeach {{-- Employee Rows --}} @foreach ($employees as $key => $employee) @php $payrollEmployeeTempStructures = isset($employee->employeeCtcMaster->payrollEmployeeTempStructures) ? $employee->employeeCtcMaster->payrollEmployeeTempStructures ->groupBy('type_id') ->toArray() : []; @endphp @php $totalEarning = 0; $totalDeduction = 0; $salarySlip = $employee->salarySlip; $slipLogs = $salarySlip ? $salarySlip->slipLogs->keyBy('type_id'): collect(); @endphp {{-- Rate of Wage --}} @php $totalMonthlyRate = 0; $totalMonthDays = $salarySlip->total_month_days ?? 30; @endphp @foreach ($payrollComponentHeads5 as $component) @if(in_array($component->id, [3715, 3716, 3717])) @php $monthlyRate = $payrollEmployeeTempStructures[$component->id][0]['calculate_salary'] ?? 0; $totalMonthlyRate += $monthlyRate; @endphp @endif @endforeach {{--Rate Per Day--}} {{--Total Paid Days --}} {{-- OT Hours --}} {{-- Earnings --}} @php $totalWage = 0; @endphp @foreach ($payrollComponentHeads5 as $component) @php $log = $slipLogs->get($component->id); $amount = $log->calculate_salary ?? 0; $totalEarning += $amount; if (in_array($component->id, [3715, 3716, 3717])) { $totalWage += $amount; } @endphp @if ($component->id == 3717) @endif @endforeach {{-- Deductions --}} @foreach ($payrollComponentHeads6 as $component) @php $log = $slipLogs->get($component->id); $amount = $log->calculate_salary ?? 0; $totalDeduction += $amount; @endphp @endforeach {{-- Net Payment --}} @endforeach
Register of Wage {{$month}}-{{$year}}
Form B
Wage Period-Monthly Rate of Wage Total Paid Days OT Hours Earning Deduction Net Payment
Sr.No. Emp. Code UAN No. ESIC No. Name of Employee Father's/Spouse Name Gender Skill Categories Department{{ $component->name }}Rate Per Day{{ $component->name }}Total WageTotal Earning{{ $component->name }}Total Deduction
{{ $key + 1 }} {{ $employee->employee_code }} {{ $employee->uan_number }} {{ $employee->esic_no }} {{ $employee->name }} {{ $employee->father_name }} {{ $employee->gender }} {{ optional($employee->category)->name }} {{ optional($employee->department)->name }}{{ number_format($monthlyRate / $totalMonthDays, 2) }}{{ number_format($totalMonthlyRate / $totalMonthDays, 2) }}{{ $salarySlip->total_paid_days ?? 0 }}{{ $salarySlip->total_overtimes ?? 0 }}{{ number_format($amount, 2) }}{{ number_format($totalWage, 2) }}{{ number_format($totalEarning, 2) }}{{ number_format($amount, 2) }}{{ number_format($totalDeduction, 2) }} {{ number_format($totalEarning - $totalDeduction, 2) }}