@foreach($payslips as $idx => $p) @php $s = $p->staff; @endphp
{{-- Header --}}
INDEPENDENT SDN BHD (1387076-M) Payslip For
{{ $p->periodLabel() }}
NAME: {{ $p->snap_name ?? $s->name }} NEW IC NO: {{ $p->snap_new_ic ?? '- -' }} PASSPORT NO: {{ $p->snap_passport ?? $s->passport_no }}
DESIGNATION: {{ $p->snap_designation ?? $s->designation }} DATE JOINED: {{ optional($p->snap_date_joined ?? $s->date_of_join)->format('d/m/Y') }} BRANCH: {{ $p->snap_branch ?? $s->site?->name }}
DEPARTMENT: {{ $p->snap_department ?? $s->department }} BANK A/C: {{ $p->snap_bank_ac ?? $s->account_number }}
{{-- Grid --}} {{-- GROSS EARNING --}} {{-- DEDUCTIONS --}}
GROSS EARNING Amount (RM)
@foreach($p->allowanceLines as $l)@endforeach
BASIC SALARY{{ number_format($p->basic_salary, 2) }}
WORKING DAYS    {{ rtrim(rtrim(number_format($p->working_days,2),'0'),'.') }} /{{ $p->days_divisor }}     {{ rtrim(rtrim(number_format($p->working_units,2),'0'),'.') }}
AL{{ number_format($p->al_amount, 2) }}
UL{{ number_format($p->ul_amount, 2) }}
OVERTIME   {{ rtrim(rtrim(number_format($p->ot_hours,2),'0'),'.') }} hrs{{ $p->ot_amount > 0 ? number_format($p->ot_amount,2) : '' }}
PUBLIC HOLIDAY/SUNDAY   {{ rtrim(rtrim(number_format($p->ph_hours,2),'0'),'.') }} hrs{{ $p->ph_amount > 0 ? number_format($p->ph_amount,2) : '' }}
{{ $l->label }}{{ number_format($l->amount,2) }}
TOTAL EARNING / INCOME{{ number_format($p->total_earning, 2) }}
NETT PAY      {{ number_format($p->nett_pay, 2) }}
DEDUCTIONS Amount (RM)
@foreach(['epf_employee'=>'EPF (EMPLOYEE)','socso_employee'=>'SOCSO (EMPLOYEE)','eis_employee'=>'EIS (EMPLOYEE)','income_tax_pcb'=>'INCOME TAX PCB','income_tax_cp38'=>'INCOME TAX CP38','unpaid_leave'=>'UNPAID LEAVE','advance'=>'ADVANCE','loan'=>'LOAN'] as $f=>$lbl) @endforeach @foreach($p->deductionLines as $l)@endforeach
{{ $lbl }}{{ $p->$f > 0 ? number_format($p->$f,2) : '' }}
{{ $l->label }}{{ number_format($l->amount,2) }}
TOTAL DEDUCTIONS{{ number_format($p->total_deductions, 2) }}
ALLOWANCE
{{-- Summary strip --}}
Basic PayDirector FeeOvertimeAllowanceGross Pay EPFSOCSOEISPCBDeductionNET PAY
{{ number_format($p->basic_salary,2) }} - {{ number_format($p->ot_amount + $p->ph_amount,2) }} {{ $p->allowance_total > 0 ? number_format($p->allowance_total,2) : '-' }} {{ number_format($p->total_earning,2) }} {{ $p->epf_employee > 0 ? number_format($p->epf_employee,2) : '' }} {{ $p->socso_employee > 0 ? number_format($p->socso_employee,2) : '' }} {{ $p->eis_employee > 0 ? number_format($p->eis_employee,2) : '' }} {{ $p->income_tax_pcb > 0 ? number_format($p->income_tax_pcb,2) : '' }} {{ number_format($p->total_deductions,2) }} {{ number_format($p->nett_pay,2) }}
- - - - - - - - - - - - - - - - - - - - - - - -
Employee Signature
@endforeach