Employee #{{ $payslip->employee_id }} @if($payslip->employee) — {{ trim(($payslip->employee->first_name ?? '').' '.($payslip->employee->last_name ?? '')) }} @endif · Run {{ $payslip->payroll_run_id }} @if($payslip->payrollRun) · {{ $payslip->payrollRun->month }}/{{ $payslip->payrollRun->year }} @endif · {{ $payslip->currency_code }}
@php $grossSalary = (float) ($payslip->employeeSalary?->gross_salary ?? $payslip->gross_earnings); $grossEarnings = (float) $payslip->gross_earnings; $unpaidDeduction = max(0, $grossSalary - $grossEarnings); $structureDeductions = (float) $payslip->total_deductions; $totalDeductions = $unpaidDeduction + $structureDeductions; $snapshot = $payslip->attendanceSnapshot; $hasDeductions = $totalDeductions > 0.001 || !empty($payslip->deductions_breakdown); @endphp| Earnings | Amount |
|---|---|
| {{ in_array(strtoupper((string) $code), ['OTHERS', 'OTHER'], true) ? 'Other Allowance' : ucwords(str_replace('_', ' ', (string) $code)) }} | {{ number_format((float) $amount, 2) }} |
| Total earnings | {{ number_format((float) $payslip->gross_earnings, 2) }} |
| Deductions | Amount |
|---|---|
| Absent Deduction @if(!empty($absentNote)) ({{ implode(', ', $absentNote) }}) @endif | {{ number_format($unpaidDeduction, 2) }} |
| {{ $label }} @if($sub) ({{ $sub }}) @endif | {{ number_format((float) $amount, 2) }} |
| No deductions recorded | |
| Total deductions | {{ number_format($totalDeductions, 2) }} |
| Gross Salary | {{ number_format($grossSalary, 2) }} |
| Less: Total Deductions | -{{ number_format($totalDeductions, 2) }} |
| Net Pay | {{ number_format((float) $payslip->net_pay, 2) }} |
| Advance Already Paid | {{ number_format((float) $payslip->advance_paid, 2) }} |
| Net Payable | {{ number_format((float) $payslip->net_payable, 2) }} |
| Channel | Amount |
|---|---|
| {{ $channelLabels[$channel] ?? $channel }} | {{ number_format((float) $allocation->amount, 2) }} |