@php use Carbon\Carbon; $isEmployeeView = request()->routeIs('employee.payslip.view'); $monthLabel = Carbon::create(null, $payslip->salary_month, null)->format('F'); $fmt = static fn ($amount) => number_format((float) $amount, 2); $showAmt = static fn ($amount) => (float) $amount > 0; $payrollAdjustments = $payslip->payrollAdjustments ?? collect(); $variableAllowances = is_array($payslip->variable_allowances) ? $payslip->variable_allowances : []; $customAllowances = $salary->normalizedCustomAllowances(); $payrollIncomeTax = (float) ($payslip->income_tax ?? 0); $customDeductionsForDisplay = collect($salary->normalizedCustomDeductions())->filter(function (array $row) use ($payrollIncomeTax) { if ((float) ($row['amount'] ?? 0) <= 0) { return false; } if (\App\Models\SalarySetup::labelIsIncomeTax((string) ($row['label'] ?? ''))) { return $payrollIncomeTax <= 0; } return true; }); @endphp
{{ __('Attendance period') }}: {{ Carbon::parse($payslip->period_start_date)->format('d M Y') }} – {{ Carbon::parse($payslip->period_end_date)->format('d M Y') }}
@endif| {{ __('Particulars') }} | {{ __('Amount (+)') }} | {{ __('Amount (−)') }} | ||
|---|---|---|---|---|
| {{ __('Basic') }} | {{ $fmt($salary->basic_salary) }} | — | ||
| {{ __('House allowance') }} | {{ $fmt($salary->house_rent) }} | — | ||
| {{ __('Medical allowance') }} | {{ $fmt($salary->medical) }} | — | ||
| {{ __('Food allowance') }} | {{ $fmt($salary->food) }} | — | ||
| {{ __('Conveyance allowance') }} | {{ $fmt($salary->conveyance) }} | — | ||
| {{ __('Utility allowance') }} | {{ $fmt($salary->utility) }} | — | ||
| {{ __('Others allowance') }} | {{ $fmt($salary->Others) }} | — | ||
| {{ $customAllow['label'] ?: __('Other allowance') }} | {{ $fmt($customAllow['amount']) }} | — | ||
| {{ __('Bonus') }} | {{ $fmt($payslip->bonus_amount) }} | — | ||
| {{ __('Arrear') }} | {{ $fmt($payslip->arrear_amount) }} | — | ||
| {{ __('Payroll adjustments') }} | ||||
|
{{ $adjRow->adjustment_type === 'deduction' ? __('Deduction') : __('Addition') }}
@if($adjRow->remarks) {{ $adjRow->remarks }} @endif
|
@if($adjRow->adjustment_type === 'deduction')
— | {{ $fmt($adjRow->amount) }} | @else{{ $fmt($adjRow->amount) }} | — | @endif
| {{ __('Payroll adjustment (net)') }} | {{ (float) $payslip->adjustment_amount > 0 ? $fmt($payslip->adjustment_amount) : '—' }} | {{ (float) $payslip->adjustment_amount < 0 ? $fmt(abs((float) $payslip->adjustment_amount)) : '—' }} | ||
| {{ \App\Services\SalaryStructureService::labelForBreakdownKey($varKey) }} | {{ $fmt($varAmt) }} | — | ||
| {{ __('Deductions') }} | ||||
| {{ __('Unpaid leave') }} [{{ $payslip->total_leave_without_pay }} {{ __('Days') }}] | — | {{ $fmt($payslip->total_leave_without_pay * $payslip->perday_salary) }} | ||
| {{ __('Extra delay') }} [{{ $payslip->late_attendance }} {{ __('Days') }}] | — | {{ $fmt($payslip->late_attendance * $payslip->perday_salary) }} | ||
| {{ $customDed['label'] ?: __('Other deduction') }} | — | {{ $fmt($customDed['amount']) }} | ||
| {{ __('Provident fund') }} | — | {{ $fmt($payslip->provident_fund) }} | ||
| {{ __('Absent') }} ({{ $payslip->total_absent }} × {{ $fmt($payslip->perday_salary) }}) | — | {{ $fmt($payslip->total_absent * $payslip->perday_salary) }} | ||
| {{ __('Advance salary') }} ({{ $advance_salary_payment->month }}-{{ $advance_salary_payment->year }} {{ __('Payment') }}) | — | {{ $fmt($advance_salary_payment->amount) }} | ||
| {{ __('PF loan deduction') }} | — | {{ $fmt($payslip->pf_loan_deduction) }} | ||
| {{ __('Staff welfare fund (employee)') }} | — | {{ $fmt($payslip->swf_employee_contribution) }} | ||
| {{ __('SWF loan deduction') }} | — | {{ $fmt($payslip->swf_loan_deduction) }} | ||
| {{ __('Taxable income') }} | {{ $fmt($payslip->taxable_income) }} | — | ||
| {{ \App\Services\PayrollIncomeTaxService::enabled() ? \App\Services\PayrollIncomeTaxService::label() : __('Income tax') }} | — | {{ $fmt($payrollIncomeTax) }} | ||
| {{ __('Sub total') }} | {{ $fmt($payslip->gross_salary) }} | {{ $fmt($payslip->total_deductions) }} | ||
{{ __('HR name') }}
{{ __('HR designation') }}