Skip to content

Commit 27acb59

Browse files
authored
Merge pull request #334 from icefoganalytics/test
Update nars-v17-2-reporting-service.ts
2 parents e355cd2 + 0da875d commit 27acb59

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/api/services/admin/nars-v17-2-reporting-service.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export class NarsV17_2ReportingService {
197197

198198
let expenses = await db("sfa.expense").where({ application_id: applicationId });
199199
let compExp = expenses.find((e) => e.category_id == 14);
200-
if (compExp) stud_sp_cost_computers = Math.ceil(compExp.amount);
200+
if (compExp) stud_sp_cost_computers = Math.min(300, Math.ceil(compExp.amount)); // $300 is the max for computers
201201

202202
let incomes = await db("sfa.income").where({ application_id: applicationId });
203203
let scholarshipIncome = incomes.filter((e) => e.income_type_id == 16); // Scholarships - Merit Based
@@ -219,13 +219,14 @@ export class NarsV17_2ReportingService {
219219
// costs
220220
let totalCosts = 0;
221221
totalCosts += app.tuition_estimate;
222-
totalCosts += Math.min(2700, Math.ceil(app.books_supplies_cost));
222+
totalCosts += Math.min(3000, Math.ceil(app.books_supplies_cost));
223223
totalCosts += app.shelter_month * app.study_months;
224224
totalCosts += app.p_trans_month * app.study_months;
225225
totalCosts += Math.ceil(app.day_care_actual * app.study_months);
226226
totalCosts += stud_sp_cost_ret_transp;
227227
totalCosts += app.x_trans_total;
228228
totalCosts += app.relocation_total;
229+
totalCosts += stud_sp_cost_computers;
229230

230231
stud_sp_cost_living_allow = app.shelter_month * app.study_months + app.p_trans_month * app.study_months;
231232

@@ -241,9 +242,7 @@ export class NarsV17_2ReportingService {
241242
if (app.is_csg_only) req_need = 0;
242243
else if (app.is_csl_full_amount) req_need = app.study_weeks * 300; // should be 300 for 2023
243244

244-
console.log(req_need, app.is_csg_only, app.is_csl_full_amount)
245-
246-
245+
console.log(req_need, app.is_csg_only, app.is_csl_full_amount);
247246

248247
let repo = new AssessmentCslftRepositoryV2(db);
249248

@@ -356,7 +355,7 @@ export class NarsV17_2ReportingService {
356355
row.push(new Column("stud_sp_cost_tuition", app.tuition_estimate, "0", 6));
357356
row.push(new Column("stud_sp_cost_comp_fee", "0", "0", 6)); // always 0
358357
row.push(new Column("stud_sp_cost_computers", stud_sp_cost_computers, "0", 6));
359-
row.push(new Column("stud_sp_cost_allow_book", Math.min(2700, Math.ceil(app.books_supplies_cost)), "0", 6));
358+
row.push(new Column("stud_sp_cost_allow_book", Math.min(3000, Math.ceil(app.books_supplies_cost)), "0", 6));
360359
row.push(new Column("stud_sp_cost_allow_child", Math.ceil(app.day_care_actual * app.study_months), "0", 6));
361360
row.push(new Column("stud_sp_cost_ret_transp", stud_sp_cost_ret_transp, "0", 6));
362361
row.push(new Column("stud_sp_cost_other_trans", app.x_trans_total + app.relocation_total, "0", 6));

0 commit comments

Comments
 (0)