fix logic and tests, update docker CI file

This commit is contained in:
root
2026-03-09 15:58:44 -04:00
parent 1cb3573d4b
commit 79e44fe037
188 changed files with 1776 additions and 524 deletions
@@ -42,7 +42,12 @@ class InvoiceGenerationServiceTest extends TestCase
'parent_id' => 10,
'firstname' => 'Kid',
'lastname' => 'User',
'school_id' => 1,
'school_id' => 'S1',
'age' => 8,
'gender' => 'Male',
'photo_consent' => 1,
'year_of_registration' => '2025',
'school_year' => '2025-2026',
'is_active' => 1,
]);
@@ -50,11 +55,14 @@ class InvoiceGenerationServiceTest extends TestCase
'class_section_id' => 1,
'class_section_name' => '1A',
'class_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
DB::table('student_class')->insert([
'student_id' => 100,
'class_section_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
'is_event_only' => 0,
]);
@@ -63,7 +71,9 @@ class InvoiceGenerationServiceTest extends TestCase
'student_id' => 100,
'parent_id' => 10,
'class_section_id' => 1,
'enrollment_date' => '2025-01-01',
'enrollment_status' => 'enrolled',
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
@@ -49,7 +49,12 @@ class InvoiceManagementServiceTest extends TestCase
'parent_id' => 10,
'firstname' => 'Kid',
'lastname' => 'User',
'school_id' => 1,
'school_id' => 'S1',
'age' => 8,
'gender' => 'Male',
'photo_consent' => 1,
'year_of_registration' => '2025',
'school_year' => '2025-2026',
'is_active' => 1,
]);
@@ -57,11 +62,14 @@ class InvoiceManagementServiceTest extends TestCase
'class_section_id' => 1,
'class_section_name' => '1A',
'class_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
DB::table('student_class')->insert([
'student_id' => 100,
'class_section_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
'is_event_only' => 0,
]);
@@ -70,7 +78,9 @@ class InvoiceManagementServiceTest extends TestCase
'student_id' => 100,
'parent_id' => 10,
'class_section_id' => 1,
'enrollment_date' => '2025-01-01',
'enrollment_status' => 'enrolled',
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
@@ -41,7 +41,12 @@ class InvoicePdfServiceTest extends TestCase
'parent_id' => 10,
'firstname' => 'Kid',
'lastname' => 'User',
'school_id' => 1,
'school_id' => 'S1',
'age' => 8,
'gender' => 'Male',
'photo_consent' => 1,
'year_of_registration' => '2025',
'school_year' => '2025-2026',
'is_active' => 1,
]);
@@ -49,11 +54,14 @@ class InvoicePdfServiceTest extends TestCase
'class_section_id' => 1,
'class_section_name' => '1A',
'class_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
DB::table('student_class')->insert([
'student_id' => 100,
'class_section_id' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
'is_event_only' => 0,
]);
@@ -62,7 +70,9 @@ class InvoicePdfServiceTest extends TestCase
'student_id' => 100,
'parent_id' => 10,
'class_section_id' => 1,
'enrollment_date' => '2025-01-01',
'enrollment_status' => 'enrolled',
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
@@ -15,9 +15,9 @@ class InvoiceTuitionServiceTest extends TestCase
public function test_calculate_tuition_fee_counts_regular_and_youth(): void
{
DB::table('classSection')->insert([
['class_section_id' => 1, 'class_section_name' => '1', 'class_id' => 1],
['class_section_id' => 2, 'class_section_name' => '2', 'class_id' => 2],
['class_section_id' => 3, 'class_section_name' => '10', 'class_id' => 10],
['class_section_id' => 1, 'class_section_name' => '1', 'class_id' => 1, 'semester' => 'Fall', 'school_year' => '2025-2026'],
['class_section_id' => 2, 'class_section_name' => '2', 'class_id' => 2, 'semester' => 'Fall', 'school_year' => '2025-2026'],
['class_section_id' => 3, 'class_section_name' => '10', 'class_id' => 10, 'semester' => 'Fall', 'school_year' => '2025-2026'],
]);
$grades = new InvoiceGradeService(9);
@@ -37,8 +37,8 @@ class InvoiceTuitionServiceTest extends TestCase
public function test_refund_deadline_includes_withdrawn_when_passed(): void
{
DB::table('classSection')->insert([
['class_section_id' => 1, 'class_section_name' => '1', 'class_id' => 1],
['class_section_id' => 2, 'class_section_name' => '2', 'class_id' => 2],
['class_section_id' => 1, 'class_section_name' => '1', 'class_id' => 1, 'semester' => 'Fall', 'school_year' => '2025-2026'],
['class_section_id' => 2, 'class_section_name' => '2', 'class_id' => 2, 'semester' => 'Fall', 'school_year' => '2025-2026'],
]);
$grades = new InvoiceGradeService(9);