Skip to content

Commit

Permalink
Merge pull request #260 from icefoganalytics/test
Browse files Browse the repository at this point in the history
STA Fix and documention fixes
  • Loading branch information
datajohnson authored Jun 19, 2024
2 parents f729d26 + 544c9cc commit 13776a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/api/repositories/assessment/assessment-sta-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export class AssessmentSTA extends AssessmentBaseRepository {
initValues.home_city_id || 0,
initValues.destination_city_id || 0,
]);

// clear travel if by correspondence
if (this.application.is_correspondence) {
initValues.travel_allowance = 0;
}

initValues.weekly_amount = await this.getScalarValue<number>("fn_get_weekly_amount_sta", [application_id]);

if (disbursementList.length) {
Expand Down Expand Up @@ -159,6 +165,12 @@ export class AssessmentSTA extends AssessmentBaseRepository {
refreshData.home_city_id || 0,
refreshData.destination_city_id || 0,
]);

// clear travel if by correspondence
if (this.application.is_correspondence) {
refreshData.travel_allowance = 0;
}

refreshData.weekly_amount = await this.getScalarValue<number>("fn_get_weekly_amount_sta", [application_id]);

refreshData.assessed_amount = await this.getScalarValue<number>("fn_get_other_inst_total_sta", [
Expand Down
6 changes: 6 additions & 0 deletions src/api/services/shared/documentation-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ export class DocumentationService {
case "Spouse as Dependent":
// I don't currently know how to handle this...
break;
case "Permanent Resident":
if (app.statistical.citizenship != "3") doc.meets_conditions = false;
break;
case "Second Residence":
if (app.funding_sources.second_residence != true) doc.meets_conditions = false;
break;
case "Yukon and Previous CSL":
// I don't currently know how to handle this...
// But I belive it's handled by not having the requirement
Expand Down

0 comments on commit 13776a4

Please sign in to comment.