{{-- Header --}}

{{ $company->name }}

@if($company->legal_name && $company->legal_name !== $company->name)

{{ $company->legal_name }}

@endif @if($company->address)

{{ $company->address }}

@endif @if($company->registration_number)

CR: {{ $company->registration_number }}

@endif

Salary Slip

{{ $period }}
{{-- Employee Details --}}
Employee Name
{{ $employee->full_name }}
Employee Code
{{ $employee->employee_code }}
Department
{{ $employee->department->name ?? '—' }}
Designation
{{ $employee->designation->name ?? '—' }}
Joining Date
{{ $employee->joining_date?->format('d M Y') ?? '—' }}
Bank Account
{{ $bankAccount ?? '—' }}
{{-- Days Summary --}}
{{ number_format($item->days_worked, 1) }}
Days Worked
{{ number_format($item->days_absent, 1) }}
Days Absent
{{ number_format($item->days_leave, 1) }}
Days Leave
{{ number_format($item->overtime_hours, 1) }}
OT Hours
{{-- Salary Table --}}
@php $earningsArr = collect($item->earnings ?? []); $deductionsArr = collect($item->deductions ?? [])->filter(fn($v) => $v > 0); $maxRows = max($earningsArr->count(), $deductionsArr->count()); $eKeys = $earningsArr->keys()->toArray(); $dKeys = $deductionsArr->keys()->toArray(); @endphp @for($i = 0; $i < $maxRows; $i++) @endfor
Earnings Amount (OMR) Deductions Amount (OMR)
{{ $eKeys[$i] ?? '' }} {{ isset($eKeys[$i]) ? number_format($earningsArr[$eKeys[$i]], 3) : '' }} {{ $dKeys[$i] ?? '' }} {{ isset($dKeys[$i]) ? number_format($deductionsArr[$dKeys[$i]], 3) : '' }}
Total Earnings {{ number_format($item->gross_salary, 3) }} Total Deductions {{ number_format($item->total_deductions, 3) }}
{{-- Net Pay --}}
Net Salary
OMR {{ number_format($item->net_salary, 3) }}
{{-- Footer --}}