@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
{{-- Header & Breadcrumb --}} {{-- Filter Section --}}
Monthly Staff Attendance Summary Report
{{-- Print School Header (Visible in print) --}} {{-- Report Data Table --}} @if(isset($reportData) && $reportData->isNotEmpty())
Monthly Summary: {{ $fromDate->format('d M, Y') }} to {{ $toDate->format('d M, Y') }}
@forelse($reportData as $data) @php $emp = $data['employee']; $primaryId = (!empty($emp->primary_id) && $emp->primary_id !== '0' && $emp->primary_id !== 0) ? $emp->primary_id : '-'; $secondaryId = (!empty($emp->e_id) && $emp->e_id !== '0' && $emp->e_id !== 0) ? $emp->e_id : '-'; $post = $emp->postDetails->name ?? ($emp->post ?? '-'); $pct = $data['attendance_percentage']; $pctColor = $pct >= 90 ? 'text-success' : ($pct >= 75 ? 'text-warning' : 'text-danger'); @endphp @empty @endforelse
Primary ID Secondary ID Employee Name Post Total Days Working Days Present Absent Leave Off/Holiday Late (Days) Expected Hours Worked Hours Shortage Attendance %
{{ $primaryId }} {{ $secondaryId }} {{ $emp->name }} {{ $post }} {{ $data['total_days'] }} {{ $data['working_days'] }} {{ $data['present_days'] }} @if($data['absent_days'] > 0) {{ $data['absent_days'] }} @else 0 @endif @if($data['leave_days'] > 0) {{ $data['leave_days'] }} @else 0 @endif {{ $data['off_days'] + $data['holiday_days'] }} @if($data['late_days'] > 0) {{ $data['late_days'] }} ({{ $data['late_hours'] }}) @else 0 @endif {{ $data['expected_hours'] }} {{ $data['worked_hours'] }} @if($data['shortage_minutes'] > 0) {{ $data['shortage_hours'] }} @else 0h 0m @endif {{ $pct }}%
No monthly attendance data found for the selected criteria.
@elseif(request()->has('from_date'))
No attendance data found for the selected criteria.
@endif
@endsection