fix enrollment logic, add financial aid, fix class distribution
Tests / PHPUnit (push) Failing after 1m6s

This commit is contained in:
root
2026-08-15 15:07:16 -04:00
parent c12bb59372
commit 4603d9ced2
95 changed files with 6892 additions and 1295 deletions
@@ -4,6 +4,7 @@ namespace App\Controllers\Administrator;
use App\Controllers\BaseController;
use App\Models\SchoolYearModel;
use App\Support\SchoolYear\SchoolYearStatus;
use Throwable;
class SchoolYearClosingController extends BaseController
@@ -12,6 +13,11 @@ class SchoolYearClosingController extends BaseController
{
try {
$targetId = $this->normalizeInt($this->request->getGet('target_school_year_id'));
$source = (new SchoolYearModel())->find($id);
if ($targetId === null && (string) ($source['status'] ?? '') === SchoolYearStatus::ACTIVE) {
$target = service('schoolYearManagement')->ensureNextDraftForClosing($id, $this->userId());
$targetId = (int) ($target['id'] ?? 0) ?: null;
}
$preview = service('schoolYearClosing')->preview($id, $targetId);
$promotionTable = $this->promotionTablePayload($preview['promotion']['rows'] ?? []);
$carryForwardTable = $this->carryForwardTablePayload($preview['carry_forward'] ?? []);