@php $d = $run->Details->sortBy(fn ($l) => $l->Staff?->name)->values(); $m = fn ($v) => number_format((float) $v, 2); $sum = fn ($c) => $d->sum($c); @endphp
@include('layouts.print_header', ['printTitle' => 'Payroll — ' . $period, 'printSubtitle' => $run->isDraft() ? 'DRAFT — not approved yet' : null])| Period: {{ $period }} | Status: {{ $run->isDraft() ? 'Draft' : 'Approved' }}{{ $run->approved_at ? ' · ' . $run->approved_at->format('d M, Y') : '' }} | Made by: {{ $run->Generator?->name ?? '-' }} · {{ $run->created_at?->format('d M, Y') }} | Printed: {{ now()->format('d M, Y h:i A') }} |
| Notes: {{ $run->notes }} | |||
| # | Staff | Basic | Attendance (days / minutes) | Additions | Deductions | Net pay | Signature | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Work | Absent | Leave paid/unpaid | Late times/min | Early min |
Comm. | OT + bonus | Absence | Unpaid leave | Late | Early | Other | Total | |||||
| {{ $i + 1 }} | {{ $l->Staff?->name ?? 'Deleted staff #' . $l->staff_id }}{{ $l->Staff?->attendance_exempt ? ' (exempt)' : '' }} | {{ $m($l->basic_salary) }} | {{ (float) $l->working_days }} | {{ (float) $l->absent_days }} | {{ (float) $l->paid_leave_days }} / {{ (float) $l->unpaid_leave_days }} | {{ $l->late_count }} / {{ $l->late_minutes }} | {{ $l->early_minutes }} | {{ $m($l->commission_amount) }} | {{ $m($l->overtime_amount + $l->adjustment_bonus) }} | {{ $m($l->absence_deduction) }} | {{ $m($l->unpaid_leave_deduction) }} | {{ $m($l->late_deduction) }} | {{ $m($l->early_deduction) }} | {{ $m($l->other_deduction + $l->adjustment_deduction) }} | {{ $m($l->deduction_amount) }} | {{ $m($l->total) }} | |
| No staff in this payroll. | |||||||||||||||||
| Total ({{ $d->count() }} staff) | {{ $m($sum('basic_salary')) }} | {{ (float) $sum('working_days') }} | {{ (float) $sum('absent_days') }} | {{ (float) $sum('paid_leave_days') }} / {{ (float) $sum('unpaid_leave_days') }} | {{ $sum('late_count') }} / {{ $sum('late_minutes') }} | {{ $sum('early_minutes') }} | {{ $m($sum('commission_amount')) }} | {{ $m($sum('overtime_amount') + $sum('adjustment_bonus')) }} | {{ $m($sum('absence_deduction')) }} | {{ $m($sum('unpaid_leave_deduction')) }} | {{ $m($sum('late_deduction')) }} | {{ $m($sum('early_deduction')) }} | {{ $m($sum('other_deduction') + $sum('adjustment_deduction')) }} | {{ $m($sum('deduction_amount')) }} | {{ $m($sum('total')) }} | ||