@extends('app-new') @push('head-script') @endpush @push('content-header')
@endpush @push('prev-next-head')| S.No. | Emp. Code | UAN No. | ESIC No. | Employee Name | Father/Husband Name | Gender | Skill Category | Department | @foreach ($payrollBasicComponents as $component){{ $component->name }} | @if($hasTotalWage && $component->alias == $totalWageAfterAlias)Total Wage | @endif @endforeachTotal Basic | WD | Rest | @foreach ($leaveTypes as $leave){{ strtoupper($leave->alias) }} | @endforeach @foreach ($payrollDeductionComponents as $component){{ $component->name }} | @endforeachTotal Deduction | Net Payment |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $employee->employee_code }} | {{ $employee->uan_number }} | {{ $employee->esic_no }} | {{ $employee->name }} | {{ $employee->father_name }} | {{ $employee->gender }} | {{ optional($employee->category)->name }} | {{ optional($employee->department)->name }} | {{-- Basic Components --}} @php $totalWage = 0; $totalBasic = 0; @endphp @foreach($payrollBasicComponents as $component) @php $amount = isset($payrollEmployeeTempStructures[$component->id][0]) ? $payrollEmployeeTempStructures[$component->id][0]['calculate_salary'] : 0; if (in_array($component->alias, $wageAliases)) { $totalWage += $amount; } else { $totalBasic += $amount; } @endphp{{ number_format($amount,2) }} | @if($hasTotalWage && $component->alias == $totalWageAfterAlias){{ number_format($totalWage, 2) }} | @endif @endforeach @php // Final Total Basic = Total Wage + Other Basic Components $totalBasic += $totalWage; @endphp{{ number_format($totalBasic,2) }} | {{ $employee->salarySlip->total_present_days ?? 0 }} | {{ $employee->salarySlip->week_offs ?? 0 }} | @php $employeeLeaves = $employee->attendanceSummary ->groupBy('leave_type') ->map(function ($item) { return $item->sum(function ($attendance) { return ($attendance->first_half_status == 'L' ? ($attendance->is_short_leave ? 1 : 0.5) : 0) + ($attendance->second_half_status == 'L' ? ($attendance->is_short_leave ? 1 : 0.5) : 0); }); }); @endphp @foreach($leaveTypes as $leave){{ $employeeLeaves[$leave->alias] ?? 0 }} | @endforeach {{-- Deduction Components --}} @foreach($payrollDeductionComponents as $component) @php $amount = $slipLogs[$component->id] ?? 0; $totalDeduction += $amount; @endphp{{ number_format($amount,2) }} | @endforeach{{ number_format($totalDeduction,2) }} | {{ number_format($totalBasic - $totalDeduction,2) }} |