update policy and fix other issues
This commit is contained in:
@@ -197,6 +197,14 @@ final class SchoolYearManagementService
|
||||
'updated_by' => $userId,
|
||||
'carry_over_balance_behavior' => $year['carry_over_balance_behavior'],
|
||||
]);
|
||||
$previousYearId = (int) ($year['previous_school_year_id'] ?? 0);
|
||||
if ($previousYearId > 0) {
|
||||
$previousYear = $this->schoolYearModel->find($previousYearId);
|
||||
service('studentYearStatus')->markReturningStudentsForTargetYear(
|
||||
(string) ($previousYear['name'] ?? ''),
|
||||
(string) ($year['name'] ?? '')
|
||||
);
|
||||
}
|
||||
$this->syncConfigurationFromSchoolYear($year);
|
||||
$this->syncActiveYearSession((string) $year['name']);
|
||||
$this->log($id, $from, SchoolYearStatus::ACTIVE, 'activate', $userId);
|
||||
|
||||
Reference in New Issue
Block a user