@php $summary = $data['executive_summary'] ?? []; $hrActivities = $data['hr_activities'] ?? []; $attendance = $data['attendance_summary'] ?? []; $leave = $data['leave_summary'] ?? []; $payroll = $data['payroll_summary'] ?? []; $compliance = $data['compliance_status'] ?? []; $upcoming = $data['upcoming_actions'] ?? []; @endphp
{{-- Header --}}

{{ $company->name ?? 'Company' }}

Monthly HR Report — {{ $report->period_label }}

Prepared by TalentArabian HR Services · Generated {{ $report->generated_at?->format('d M Y') }}

{{-- Section 1: Executive Summary --}}
1. Executive Summary
{{ $summary['employees_start'] ?? 0 }}
Start of Month
{{ $summary['employees_end'] ?? 0 }}
End of Month
+{{ $summary['new_hires'] ?? 0 }}
New Hires
-{{ $summary['exits'] ?? 0 }}
Exits
{{ $summary['attendance_rate'] ?? 0 }}%
Attendance
{{ $summary['total_leave_days'] ?? 0 }}
Leave Days
{{-- Section 2: HR Activities --}}
2. HR Activities Performed by TalentArabian
@php $actSummary = $hrActivities['summary'] ?? []; @endphp @foreach([ 'Employees Onboarded' => $actSummary['onboarding'] ?? 0, 'Letters Issued' => $actSummary['letters_issued'] ?? 0, 'Leave Requests Processed' => $actSummary['leave_processed'] ?? 0, 'Attendance Uploads' => $actSummary['attendance_uploads'] ?? 0, 'Payroll Runs Finalized' => $actSummary['payroll_processed'] ?? 0, 'Documents Managed' => $actSummary['documents_managed'] ?? 0, 'Notices Posted' => $actSummary['notices_posted'] ?? 0, 'Exit Processes' => $actSummary['exit_processes'] ?? 0, ] as $label => $count) @endforeach
ActivityCount
{{ $label }}{{ $count }}
Total Actions{{ $actSummary['total_actions'] ?? 0 }}
{{-- Section 3: Attendance --}}
3. Attendance Summary
{{ $attendance['attendance_percentage'] ?? 0 }}%
Overall Rate
{{ $attendance['total_present'] ?? 0 }}
Present
{{ $attendance['total_absent'] ?? 0 }}
Absent
{{ $attendance['total_late'] ?? 0 }}
Late
{{ $attendance['total_overtime_hours'] ?? 0 }}
OT Hours
{{-- Section 4: Leave --}}
4. Leave Summary
{{ $leave['total_requests'] ?? 0 }}
Total Requests
{{ $leave['approved'] ?? 0 }}
Approved
{{ $leave['rejected'] ?? 0 }}
Rejected
{{ $leave['total_days'] ?? 0 }}
Total Days
{{-- Section 5: Payroll --}}
5. Payroll Summary
@if(($payroll['status'] ?? 'not_processed') !== 'not_processed' && ($payroll['status'] ?? '') !== 'unavailable')
{{ $payroll['employee_count'] ?? 0 }}
Employees
OMR {{ number_format($payroll['total_earnings'] ?? 0, 3) }}
Earnings
OMR {{ number_format($payroll['total_deductions'] ?? 0, 3) }}
Deductions
OMR {{ number_format($payroll['total_net'] ?? 0, 3) }}
Net Disbursed
@else

Payroll not processed for this period.

@endif
{{-- Section 6: Compliance --}}
6. Compliance Status
@php $oman = $compliance['omanization'] ?? []; @endphp

Omanization Ratio: {{ number_format($oman['ratio'] ?? 0, 1) }}% (Required: {{ number_format($oman['required'] ?? 0, 1) }}%) {{ ($oman['is_compliant'] ?? false) ? 'COMPLIANT' : 'NON-COMPLIANT' }}

{{-- Section 7: Upcoming --}} @if(count($upcoming) > 0)
7. Upcoming Actions (Next 30 Days)
@foreach(array_slice($upcoming, 0, 15) as $action) @endforeach
TypeDescriptionUrgency
{{ $action['label'] }} {{ $action['description'] }} {{ ucfirst($action['urgency']) }}
@endif