From f68da663fef18bb6bbbbcd1dc395fcced4387c9b Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Mon, 25 Nov 2024 14:02:23 -0700 Subject: [PATCH] Fix for Dep Abroad --- .../assessment/assessment-cslft-repository-v2.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/api/repositories/assessment/assessment-cslft-repository-v2.ts b/src/api/repositories/assessment/assessment-cslft-repository-v2.ts index df1b61e5..671115ed 100644 --- a/src/api/repositories/assessment/assessment-cslft-repository-v2.ts +++ b/src/api/repositories/assessment/assessment-cslft-repository-v2.ts @@ -100,6 +100,16 @@ export class AssessmentCslftRepositoryV2 { }) .first(); + if (!this.dependentAllowance) { + this.dependentAllowance = await this.db("sfa.student_living_allowance") + .where({ + academic_year_id: this.application.academic_year_id, + province_id: 3, // use Yukon + student_category_id: depCategory.id, + }) + .first(); + } + let sdaCategory = this.studentCategories.find((c) => c.code == "SDA"); this.sdaAllowance = await this.db("sfa.student_living_allowance")