fix school year and enrollment steps
Tests / PHPUnit (push) Failing after 58s

This commit is contained in:
root
2026-08-15 21:15:05 -04:00
parent 4603d9ced2
commit 3cbfc40934
18 changed files with 1142 additions and 163 deletions
+6 -1
View File
@@ -8,6 +8,11 @@ use App\Models\ClassSectionModel;
class FeeCalculationService
{
public function calculateEnrollmentTuition(array $students): float
{
return round($this->calculateTotalTuitionFee($students), 2);
}
public function calculateRefund(array $students, int $parentId): float
{
$configModel = new ConfigurationModel();
@@ -145,7 +150,7 @@ class FeeCalculationService
// ✅ Pre-fetch and assign grade/class section names before sorting
foreach ($students as &$student) {
$gradeName = $classSectionModel->getClassSectionNameBySectionId($student['class_section_id']);
$gradeName = $classSectionModel->getClassSectionNameBySectionId((int) ($student['class_section_id'] ?? 0));
$student['grade'] = strtoupper(trim($gradeName));
}
unset($student); // break reference