@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @section('content')
@if (!empty($contractorName))
Contractor : {{ $contractorName }}
@endif @if (!empty($employeeType))
Employee Type : {{ $employeeType }}
@endif @if (!empty($status))
Month Day's Status : {{ $status }}
@endif @if (!empty($departmentName))
DEPARTMENT : {{ $departmentName }}
@endif @if (!empty($contractorName))

WAGES SHEET OF {{ $contractorName }} FOR THE MONTH OF {{ date('F - Y', strtotime('01-' . $month . '-' . $year)) }}

@else

WAGES SHEET OF {{ $organization->name }} FOR THE MONTH OF {{ date('F - Y', strtotime('01-' . $month . '-' . $year)) }}

@endif
@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; $arrearDays = $attendanceData['arrearDays'] ?? 0; $co = $attendanceData['compensations'] ?? 0; $ph = $attendanceData['holidays'] ?? 0; $payDay = $attendanceData['totalPaidDays'] ?? 0; $totalPaidDay = $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; @endphp @endforeach @foreach ($deductionDerivedComponents as $component) @php $deduction = round($slipLogs[$component->id] ?? 0, 2); $deductionDerivedTotal += $deduction; @endphp @endforeach @php $netPayable = $earningDerivedTotal - $deductionDerivedTotal; @endphp @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 ?? '-' }} {{ $employee->category->name ?? '-' }} {{ $present }} {{ $ph }} {{ $arrearDays ?? '-' }} {{ round($totalPaidDay, 2) }} {{ $attendanceData['actualOT'] ?? '-' }} {{ $attendanceData['arrearsOT'] ?? '-' }} {{ $attendanceData['totalOT'] ?? '-' }}{{ $earning }}{{ round($earningDerivedTotal, 2) }}{{ $deduction }}{{ round($deductionDerivedTotal, 2) }}{{ round($netPayable, 2) }}
{{ $employees->appends($request->except('page'))->links('pagination::bootstrap-4') }}
@endsection @push('footer-script') @endpush