@extends('adminlte::page') @section('title', 'Reports') @section('content_header')

Reports

HR, attendance, leave, and payroll summaries
@stop @section('content')
@forelse($staffByDepartment as $department) @empty @endforelse
Department Code Employees
{{ $department->name }} {{ $department->code ?: '-' }} {{ $department->employees_count }}
No departments found.
On Leave

{{ $staffSummary['on_leave'] }}

Suspended

{{ $staffSummary['suspended'] }}

Terminated

{{ $staffSummary['terminated'] }}

Active Ratio

{{ $staffSummary['total'] > 0 ? number_format(($staffSummary['active'] / $staffSummary['total']) * 100, 1) : '0.0' }}%

@foreach($attendanceSummary as $status => $count) @endforeach
Status Records
{{ $status }} {{ $count }}
@foreach($leaveSummary as $status => $data) @endforeach
Status Requests Days
{{ $status }} {{ $data['total'] }} {{ number_format((float) $data['days'], 1) }}
@forelse($payrollRuns as $run) @empty @endforelse
Period Status Gross Deductions Employer Net Cost
{{ $run->period->name ?? 'Unknown period' }} @if($run->period)
{{ $run->period->period_start->format('M d') }} - {{ $run->period->period_end->format('M d, Y') }}
@endif
{{ $run->status }} {{ number_format((float) $run->gross_total, 2) }} {{ number_format((float) $run->deduction_total, 2) }} {{ number_format((float) $run->employer_contribution_total, 2) }} {{ number_format((float) $run->net_total, 2) }} {{ number_format((float) $run->gross_total + (float) $run->employer_contribution_total, 2) }}
No payroll runs found for this period.
Totals {{ number_format((float) $payrollSummary['gross_total'], 2) }} {{ number_format((float) $payrollSummary['deduction_total'], 2) }} {{ number_format((float) $payrollSummary['employer_contribution_total'], 2) }} {{ number_format((float) $payrollSummary['net_total'], 2) }} {{ number_format((float) $payrollSummary['gross_total'] + (float) $payrollSummary['employer_contribution_total'], 2) }}
@foreach($payrollSummary['status_counts'] as $status => $count) @endforeach
{{ $status }} {{ $count }}
@forelse($deductionBreakdown as $deduction) @empty @endforelse
{{ $deduction->type }} {{ number_format((float) $deduction->total, 2) }}
No deductions found.
@forelse($payrollCostByDepartment as $row) @empty @endforelse
Department Employees Basic Allowances Deductions Employer Net Total Cost
{{ $row->department_name }} {{ $row->employees }} {{ number_format((float) $row->basic_total, 2) }} {{ number_format((float) $row->allowance_total, 2) }} {{ number_format((float) $row->deduction_total, 2) }} {{ number_format((float) $row->employer_contribution_total, 2) }} {{ number_format((float) $row->net_total, 2) }} {{ number_format((float) $row->payroll_cost_total, 2) }}
No department payroll cost found for this period.
@forelse($payrollLiabilitiesByRun as $run) @empty @endforelse
Run Deductions Employer Total
{{ $run->period->name ?? 'Run #'.$run->id }} {{ number_format((float) $run->statutory_deduction_total, 2) }} {{ number_format((float) $run->employer_contribution_total, 2) }} {{ number_format((float) $run->liability_total, 2) }}
No payroll liabilities found.
Expiring in 60 days {{ $staffSummary['contracts_expiring_soon'] }}
@stop @section('css') @stop