# Skulitech ERP: Bulk Sponsor Receipting and Accrual Accounting Implementation

**Release date:** 14 July 2026  
**Target platform:** Windows XAMPP (`C:\xampp\htdocs\college_erp`)

## Purpose

This release makes sponsor receipting visible in the Finance menu and supports a single HELB transfer, County or NG-CDF cheque, scholarship payment, or other sponsor receipt that is distributed to many learner accounts without recording the cash twice.

## Visible menu structure

- **Finance → Bulk Sponsor Receipting**
- **Finance → Sponsor Receipts**
- **Finance → Bulk Student Allocations**
- **Finance → Sponsor Control Reports**
- **Finance → IPSAS Reports**

Users need the `finance_sponsors` privilege. The bundled Admin and Finance roles include this privilege, and the migration adds it to existing finance-capable roles where applicable.

## Supported funding sources

The module includes default source categories for:

- HELB
- County Government bursaries
- NG-CDF/CDF constituency bursaries
- Scholarships
- Other sponsors and donors

Each source can record a specific programme name, County or constituency jurisdiction, sponsor identifier and contact details. This allows separate records such as “Nandi County Bursary 2026” or “Emgwen NG-CDF Bursary 2026”.

## One receipt, many students

The new bulk screen captures the parent receipt and student schedule in one controlled transaction:

1. Select the sponsor and optional accrued award.
2. Enter the amount received, bank or cheque reference and receipt date.
3. Mark the transfer as cleared, or retain a cheque as **Pending Clearance**.
4. Upload the Excel or CSV allocation schedule.
5. The system validates all admission numbers, amounts and the schedule total.
6. One draft sponsor receipt and one linked allocation batch are created.
7. Approve the receipt only after bank clearance.
8. Validate and post the allocation batch.
9. Print the official sponsor receipt, batch register and non-cash student allocation advices.

The student schedule may be less than the receipt amount; the remainder stays in the sponsor control account as unallocated funds. The schedule may never exceed the available receipt balance.

## Bulk spreadsheet format

The polished template is available at:

`imports\templates\sponsor_bulk_allocation_template.xlsx`

Required columns:

- `admission_no`
- `amount`

Optional columns:

- `reference`
- `beneficiary_reference`
- `remarks`

The parser also accepts common alternatives such as `admission_number`, `adm_no`, `allocated_amount`, `bursary_amount` and `loan_amount`.

## Accrual-oriented accounting flow

### Approved award recognised on accrual basis

```text
Dr Sponsor Bursary and Scholarship Receivables
    Cr Sponsor Funds Unallocated Control
```

### Bank receipt against an accrued award

```text
Dr Cash at Bank
    Cr Sponsor Bursary and Scholarship Receivables
```

### Receipt where no award was accrued

```text
Dr Cash at Bank
    Cr Sponsor Funds Unallocated Control
```

### Allocation to learner accounts

```text
Dr Sponsor Funds Unallocated Control
    Cr Student Fee Receivables
```

The learner allocation does not debit cash or create another official bank receipt. This prevents double receipting.

## Main controls

- Duplicate bank or cheque references are blocked.
- Cheques marked **Pending Clearance** cannot be posted to Cash at Bank.
- Allocation schedules cannot exceed the uncommitted parent receipt balance.
- Unknown learner admission numbers stop the upload before records are committed.
- The receipt and schedule are created within one database transaction.
- A posted allocation requires a posted parent receipt.
- Cancellation and reversal preserve audit records.
- Individual learner documents are labelled as non-cash allocation advices.
- Sponsor reports reconcile received, allocated and unallocated balances.

## Database upgrade

New migration:

`database\migrations\20260714_003_bulk_sponsor_receipting.sql`

It adds:

- Sponsor programme, jurisdiction and identifier fields
- Receipt bank-clearance status and cleared date
- Beneficiary reference and remarks on student allocation lines
- Finance sponsor privileges for eligible existing roles

For XAMPP, run:

```bat
C:\xampp\htdocs\college_erp\bin\xampp_install.bat
C:\xampp\htdocs\college_erp\bin\xampp_validate.bat
```

## Validation results

- **187/187 PHP files passed syntax validation**
- **3/3 JavaScript files passed syntax validation**
- **192 POST forms checked; 0 missing CSRF tokens**
- **0 nested forms detected**
- **109 unique database tables**
- **65 unique foreign keys**
- **3/3 migration checksums matched**
- CSV and XLSX schedule parsing passed with two sample students totalling **KSh 55,000**
- XLSX archive integrity passed
- Menu, permission, wrapper route and print-page checks passed

A live MySQL transaction and browser acceptance test remains necessary on the target Windows XAMPP computer because the build environment did not include PDO MySQL or MariaDB/MySQL.

## Compliance boundary

The implementation is **IPSAS-oriented**, not an audit certification. The institution’s accountant and auditor should approve the chart-of-accounts mapping, recognition policy, treatment of restricted sponsor funds, period-end adjustments, presentation and disclosures before official reporting.
