# Skulitech ERP — Student Clearance Arrears and Admission Placement Upgrade

**Release date:** 25 July 2026

## 1. Institution-wide student clearance arrears check

Student clearance now checks the learner's complete financial account instead of checking only the selected clearance year or module.

The calculation includes:

- All fee billings across every academic year and module.
- Posted direct student payments.
- Posted sponsor/funding allocations.
- Payment reallocations and reconciliations between periods.
- Valid payment corrections while excluding reversed/voided payments.
- Legacy student fee totals when no detailed billing records exist.

### Clearance behaviour

- The total accumulated arrears are stored on the clearance request.
- Finance is automatically set to **Hold** when the accumulated balance is above zero.
- Finance is automatically marked **Cleared** when no accumulated arrears remain.
- The complete arrears summary is inserted into the Finance comment field.
- The same summary is inserted into every matching HOD comment field without deleting manually entered HOD comments.
- The system-generated comment is refreshed rather than duplicated.
- Final clearance remains blocked while Finance is on Hold.
- Staff, student portal, and printed clearance views display the accumulated balance and detailed period summary.

## 2. Mandatory academic placement during admission

A student admission cannot be saved unless the following fields contain valid values:

- Department
- Course
- Class
- Module

### Direct student registration

The Add Student form marks Department, Course, Class, and Module as required. Server-side validation prevents bypassing the browser validation. Submitted values remain available when validation fails.

Selecting a class automatically aligns the related department, course, session, module, and year to reduce the number of manual steps.

### Bulk student import

Every imported row must contain a valid Department, Course, Class, Module, Student Name, and Email. The class is treated as the source of truth and related academic placement values are harmonized before the student is created.

### Applications and approval

- Internally created applications require Department, Course, Class, and Module.
- Public applicants continue selecting Department and Course without needing to understand internal class allocation.
- Admissions must select the exact Class and Module before clicking **Approve & Print**.
- The chosen class must belong to the applicant's course.
- The chosen module must match the selected class.
- The selected class and module are saved on the application and copied to the student record.

### Reporting protection

Legacy students with missing Department, Course, Class, or Module cannot be marked Reported, Registered, or Active. Admissions must first complete the academic placement, preventing incomplete billing and reporting records.

## 3. Database changes

Runtime schema checks apply the required columns automatically. Standalone migrations are also included:

- `database/migrations/2026_07_25_clearance_accumulated_arrears.sql`
- `database/migrations/2026_07_25_required_admission_class_department_module.sql`

The current consolidated schema is also updated.

## 4. Deployment

1. Back up the existing application folder and MySQL database.
2. Replace the application files with this build.
3. Import the two SQL migrations through phpMyAdmin, or allow the runtime schema checks to apply them automatically.
4. Log in as Admissions and test a new student admission.
5. Log in as Finance or an authorized clearance officer and refresh a student clearance request.
6. Confirm the HOD and Finance comments contain the complete accumulated arrears summary.

## 5. Recommended live acceptance tests

- Student with arrears in two academic years and three modules.
- Student with direct payments and sponsor allocations.
- Student with an overpayment in one period and arrears in another.
- Student with a corrected or reversed receipt.
- Student with zero balance across all periods.
- Direct admission submitted without class or module.
- Bulk import row missing department, class, or module.
- Public application approved without selecting class/module.
- Legacy admitted student missing class/module being marked Reported.
