@php use App\Services\Employee\PayrollPayslipReleaseService; use App\Services\Employee\PayrollPayslipPdfService; $pdfService = app(PayrollPayslipPdfService::class); $showAmounts = (bool) ($showAmounts ?? $showFullPayrollFields ?? true); $fmt = static fn ($amount) => $pdfService->formatSlipAmount($amount, $showAmounts); $earnings = $earningsRows ?? []; $deductions = $deductionRows ?? []; $rowCount = max(count($earnings), count($deductions), 3); @endphp @if (($releaseMode ?? '') === PayrollPayslipReleaseService::MODE_REVERSED_NOTICE)
This payroll period was reversed. This payslip is not valid for release.
@endif @if (($releaseMode ?? '') === PayrollPayslipReleaseService::MODE_DRAFT_PREVIEW && ($showDraftBanner ?? false))
Draft preview only — lock this payroll period to release official payslips to employees.
@endif
{{ $payslipReference ?? 'Salary Slip' }}
Employee Name {{ $employee?->full_name ?? '—' }}
Job No {{ $employee?->employee_number ?? '—' }}
Designation {{ $employee?->job_title ?? '—' }}
Period {{ $periodLabel ?? $period->period_start->format('F Y') }}
@for ($i = 0; $i < $rowCount; $i++) @php $earning = $earnings[$i] ?? null; $deduction = $deductions[$i] ?? null; @endphp @endfor
Earnings Deductions
{{ $earning['label'] ?? '' }} {{ $earning ? $fmt($earning['amount'] ?? 0) : '' }} {{ $deduction['label'] ?? '' }} {{ $deduction ? $fmt($deduction['amount'] ?? 0) : '' }}
Gross Pay {{ $fmt($line->gross_pay) }} Total Deductions {{ $fmt($line->deductions) }}
Net Salary {{ $fmt($line->net_pay) }}
{{ $netPayInWords ?? '' }}
Cheque No{{ $chequeNumber ?: '—' }} Bank Name{{ $bankName ?? '—' }}
Account No{{ $maskedBankAccount ?? '—' }} Date{{ $paymentDateLabel ?? '—' }}
@if ($line->notes)

{{ $line->notes }}

@endif
Employee Signature
 
Human Resource Manager
@include('loan.documents.pdf.partials.hr-stamp', [ 'branding' => $branding ?? [], 'stampDateLabel' => $stampDateLabel ?? null, ])