# Employee Report ## Purpose **Human Resources → Employee Report** (`/employees/report`) reports employee headcounts by department, age group, scientific degree category and employment type at a specified date. It counts people, not full-time equivalents or teaching hours. Unlike the [employee summary](/en/docs/employee-summary), it is a snapshot at one date rather than an academic-year analysis based on configured educator roles. ## Generating the report The page initially loads today’s report with standard age groups. | Control | Result | | --- | --- | | Report date | Determines active appointments and age on that date | | Category | Multi-select scientific degree categories; without a selection, active categories plus No category are included | | Age groups | Opens the range editor | | Submit | Recalculates the table with current fields | | Only with data / Show all | Hides or restores zero age rows and departments without nonzero rows | | Export | XLSX using current form fields and the nonempty-row setting | | Print | Prints the displayed table through the browser | The server also supports faculty (`faculty_id`) and department (`academic_department_id`) filters, but the current page does not render selectors for them. These are report criteria, not organizational permission restrictions. ### Age ranges Defaults are up to and including 34, 35–44, 45–54, 55–64, and 65 or older. In the age groups editor, change From and To, add or remove groups, close using Save and submit the report. The interface accepts ages from 0 to 120. An empty lower bound means no minimum, an empty upper bound means no maximum; both empty covers all known ages. Removing all ranges restores the defaults on submission. Bounds are inclusive. If ranges overlap, an employee belongs to the first matching one in list order. An employee matching no group is excluded. Without a birthdate, an employee is excluded even with an all-ages range. For complete coverage of known ages, use adjacent nonoverlapping ranges without gaps. ## Table and data sources The table lists each department, one row per age range, and a department subtotal. Each active scientific degree category has three subcolumns: - **Main employment** (`main`): employees whose personal record identifies their employment as main. - **Non-main employment** (`non_main`): the others. - **Hourly payment** (`hours_payment`): people with an active hourly assignment at the same department. This is an additional indicator, not a third mutually exclusive group. The category comes from the employee’s scientific activity: the selected degree links to a category in [employee settings](/en/docs/employee-settings). Without a degree or category and without an explicit category filter, the employee is shown under virtual No category. Categories unavailable in the active catalog do not form separate columns. ### Who is counted - The employee and department are not deleted. - The employee has an appointment to the relevant department via a department-scoped role. A faculty or other appointment alone is not enough. - Appointment start is on or before the report date, and its end is absent or on/after the date. - Age on the report date matches a group. - The degree category matches a displayed column. Repeated appointments at the same department should not inflate the count. An employee with appointments in two departments may appear in both. At the bottom of the screen, the grand total counts unique employees across the report instead of summing department totals. ## Formulas and example - Row total = sum of main and non-main counts across displayed categories. - Department total = sum of its age rows. - Grand total = number of unique employees included in at least one row. For example, a mathematics department has three main and two non-main employees aged 35–44 in one category. Two of those five have active hourly assignments. The cells are 3 / 2 / 2 and the total is 5, not 7. If one also works at another department, they may appear in that department but will count only once in the institution-wide total. ## Export, print and permissions Submit after changing any fields so that the table, printout and export refer to the same selection. Export recomputes the report with the current form fields and generates `employee-report-.xlsx`. The file has grouped headers, age rows and department subtotals; the unique grand total is displayed separately on screen but is not emitted as a separate XLSX row. Only with data affects the export. Print uses the displayed table. Viewing requires `employee-report.index` and access to the scientific degree category catalog. XLSX requires `employee-report.export`. This report’s routes do not declare organizational permission scopes; department is a report grouping, not an automatically applied access restriction. Grant report access only to a role authorized to view these aggregate figures. ## Troubleshooting differences from the register Check [employee records](/en/docs/employees), employment dates, birthdate, degree category, main employment and hourly payment. Verify the report date and age ranges. Do not compare the one-date snapshot with the [academic-year summary](/en/docs/employee-summary) without accounting for their different counting methods. ## Implementation references - [Report form, age ranges and table](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/HR/EmployeeReport/container/EmployeeReport.tsx) - [Report and export permissions](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/HR/EmployeeReport/store/thunk.ts) - [Report routes](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/routes/api.php) - [Report filter validation](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/Http/Requests/EmployeeReportRequest.php) - [Eligible employment records](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/Repositories/EmployeeReportRepository.php) - [Age groups and headcount formulas](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/Services/EmployeeReportService.php) - [XLSX output](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/Services/EmployeeReportExcelExporter.php) - [Nonempty row export](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/EmployeeReport/Http/Controllers/EmployeeReportController.php)