fix enrollment logic, add financial aid, fix class distribution
Tests / PHPUnit (push) Failing after 1m6s
Tests / PHPUnit (push) Failing after 1m6s
This commit is contained in:
@@ -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'] ?? []);
|
||||
|
||||
Reference in New Issue
Block a user