@extends('layouts.app') @section('title', 'Reports') @section('styles') @endsection @section('content') {{-- Tabs --}}
{{-- Year Selector --}}
{{-- ═══════════ LOCUM TAB ═══════════ --}}
{{-- Annual Summary Table --}}

CLARA ROSA HOSPITAL | ANNUAL LOCUM EXPENDITURE SUMMARY

Financial Year: {{ $year }}

@php $lt = ['locums'=>0,'shifts'=>0,'gross'=>0,'wht'=>0,'deductions'=>0,'net'=>0]; @endphp @foreach($locumAnnual as $row) @php $lt['locums'] += $row['locums']; $lt['shifts'] += $row['shifts']; $lt['gross'] += $row['gross']; $lt['wht'] += $row['wht']; $lt['deductions'] += $row['deductions']; $lt['net'] += $row['net']; @endphp @endforeach
Month No. of Locums Total Shifts Gross Pay (KES) WHT (KES) Other Deductions (KES) Net Pay (KES)
{{ $row['month'] }} {{ $row['locums'] ?: '-' }} {{ $row['shifts'] ?: '-' }} {{ $row['gross'] ? number_format($row['gross']) : '-' }} {{ $row['wht'] ? number_format($row['wht']) : '-' }} {{ $row['deductions'] ? number_format($row['deductions']) : '-' }} {{ $row['net'] ? number_format($row['net']) : '-' }}
ANNUAL TOTAL {{ $lt['locums'] }} {{ $lt['shifts'] }} KES {{ number_format($lt['gross']) }} KES {{ number_format($lt['wht']) }} KES {{ number_format($lt['deductions']) }} KES {{ number_format($lt['net']) }}
{{-- Locum Compliance Alerts --}}

Expired Licenses ({{ $expiredLicenses->count() }})

@if($expiredLicenses->count())
@foreach($expiredLicenses as $l)

{{ $l->full_name }}

{{ $l->license_no }} · Expired {{ $l->license_expiry->format('d M Y') }}

@endforeach
@else

No expired licenses

@endif

Missing KRA PIN ({{ $missingKra->count() }})

@if($missingKra->count())
@foreach($missingKra as $l)

{{ $l->full_name }}

{{ $l->role_designation }} · {{ $l->department->name ?? '' }}

@endforeach
@else

All locums have KRA PINs

@endif

Unpaid Approved ({{ $unpaidApproved->count() }})

@if($unpaidApproved->count())
@foreach($unpaidApproved as $item)

{{ $item->locum->full_name ?? '' }}

{{ $item->batch->month_name ?? '' }}

KES {{ number_format($item->net_pay) }}
@endforeach
@else

No unpaid approved items

@endif
{{-- ═══════════ FT STAFF TAB ═══════════ --}}
{{-- Quick action bar --}}
Detailed Reports →
{{-- Annual Summary Table --}}

CLARA ROSA HOSPITAL | ANNUAL FULL-TIME STAFF EXPENDITURE SUMMARY

Financial Year: {{ $year }}

@php $ft = ['staff'=>0,'gross'=>0,'statutory'=>0,'deductions'=>0,'net'=>0]; @endphp @foreach($ftAnnual as $row) @php $ft['staff'] = max($ft['staff'], $row['staff']); // peak headcount, not sum $ft['gross'] += $row['gross']; $ft['statutory'] += $row['statutory']; $ft['deductions'] += $row['deductions']; $ft['net'] += $row['net']; @endphp @endforeach
Month No. of Staff Gross Pay (KES) Total Statutory (KES) Other Deductions (KES) Net Pay (KES)
{{ $row['month'] }} {{ $row['staff'] ?: '-' }} {{ $row['gross'] ? number_format($row['gross']) : '-' }} {{ $row['statutory'] ? number_format($row['statutory']) : '-' }} {{ $row['deductions'] ? number_format($row['deductions']) : '-' }} {{ $row['net'] ? number_format($row['net']) : '-' }}
ANNUAL TOTAL {{ $ft['staff'] }} KES {{ number_format($ft['gross']) }} KES {{ number_format($ft['statutory']) }} KES {{ number_format($ft['deductions']) }} KES {{ number_format($ft['net']) }}

Total Statutory = PAYE + SHIF + NSSF (employee) + AHL (employee). Employer contributions are not included here — see Detailed Reports for full employer cost.

{{-- FT Staff Compliance Alerts --}}

Blocked Staff ({{ $ftBlockedStaff->count() }})

@if($ftBlockedStaff->count()) @else

All FT staff are payable

@endif

Outstanding Statutory ({{ $ftOutstandingStatutory->count() }})

@if($ftOutstandingStatutory->count())
@foreach($ftOutstandingStatutory as $r)

{{ $r->label }}

{{ $r->run->run_number ?? '' }} · Due {{ $r->due_date?->format('d M') }}

KES {{ number_format($r->amount_due) }}
@endforeach
@else

All statutory remittances are paid

@endif

Unapproved Runs ({{ $ftUnapprovedRuns->count() }})

@if($ftUnapprovedRuns->count()) @else

All runs approved

@endif
@endsection @section('scripts') @endsection