@extends('layouts.app') @section('title', 'Locum Reports') @section('content') {{-- Year Selector --}}
{{-- Annual Summary Table --}}

CLARA ROSA HOSPITAL | ANNUAL LOCUM EXPENDITURE SUMMARY

Financial Year: {{ $year }}

@php $totals = ['locums'=>0,'shifts'=>0,'gross'=>0,'wht'=>0,'deductions'=>0,'net'=>0]; @endphp @foreach($annual as $row) @php $totals['locums'] += $row['locums']; $totals['shifts'] += $row['shifts']; $totals['gross'] += $row['gross']; $totals['wht'] += $row['wht']; $totals['deductions'] += $row['deductions']; $totals['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 {{ $totals['locums'] }} {{ $totals['shifts'] }} KES {{ number_format($totals['gross']) }} KES {{ number_format($totals['wht']) }} KES {{ number_format($totals['deductions']) }} KES {{ number_format($totals['net']) }}
{{-- Compliance Alerts --}}
{{-- Expired Licenses --}}

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 --}}

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 --}}

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
@endsection @section('scripts') @endsection