Fix semester context, attendance rosters, and billing workflows
- load global semester helpers consistently and use date-based semester defaults - fix grading and daily attendance duplicate student/section rows - keep attendance violations scoped to the current semester by default - update invoice, refund, discount, payment, and financial aid flows - add configuration cleanup migrations for duplicate calendar/semester keys - refresh parent registration/report-card and print request handling - update related models, services, views, cron notes, and test coverage
This commit is contained in:
@@ -17,7 +17,7 @@ class SemesterRangeService
|
||||
public function getSchoolYearRange(string $schoolYear): array
|
||||
{
|
||||
$startCfg = (string)($this->configModel->getConfig('fall_semester_start') ?? '');
|
||||
$endCfg = (string)($this->configModel->getConfig('last_school_day') ?? '');
|
||||
$endCfg = (string)($this->configModel->getConfig('last_day_of_school') ?? '');
|
||||
|
||||
$start = null;
|
||||
$end = null;
|
||||
@@ -76,7 +76,7 @@ class SemesterRangeService
|
||||
$fallStartCfg = (string)($this->configModel->getConfig('fall_semester_start') ?? '');
|
||||
$fallEndCfg = (string)($this->configModel->getConfig('fall_end_date') ?? '');
|
||||
$springStartCfg = (string)($this->configModel->getConfig('spring_semester_start') ?? '');
|
||||
$springEndCfg = (string)($this->configModel->getConfig('last_school_day') ?? '');
|
||||
$springEndCfg = (string)($this->configModel->getConfig('last_day_of_school') ?? '');
|
||||
|
||||
$md = static fn(string $cfg, int $year, string $fallback): string =>
|
||||
$cfg !== '' ? sprintf('%04d-%s', $year, date('m-d', strtotime($cfg))) : $fallback;
|
||||
@@ -112,8 +112,7 @@ class SemesterRangeService
|
||||
{
|
||||
$fallStartCfg = (string)($this->configModel->getConfig('fall_semester_start') ?? '');
|
||||
$springStartCfg = (string)($this->configModel->getConfig('spring_semester_start') ?? '');
|
||||
$lastDayCfg = (string)($this->configModel->getConfig('last_school_day')
|
||||
?? $this->configModel->getConfig('last_day_of_school') ?? '');
|
||||
$lastDayCfg = (string)($this->configModel->getConfig('last_day_of_school') ?? '');
|
||||
|
||||
try {
|
||||
$target = new DateTimeImmutable($date ?: 'now');
|
||||
|
||||
Reference in New Issue
Block a user