Skip to content

Commit

Permalink
Merge pull request #272 from icefoganalytics/test
Browse files Browse the repository at this point in the history
Fixing dependent count for Single dependent
  • Loading branch information
datajohnson authored Jun 27, 2024
2 parents b2efaf7 + e0a7743 commit 5be6c38
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,9 @@ async function calculateFamilySize(
logger.info(`PARENT INFO: ${hasParent1}, ${hasParent2}`);

family.total_dependants = 1 + parentDeps.length;
family.csl_dependants = 1;

// this is different from NARS - it shouldn't include the student as a dependent because it increases the costs
family.csl_dependants = 0;
family.post_secondary = parentDeps.filter((f: any) => f.is_attend_post_secondary).length + 1;
family.family_size = 1 + parentDeps.length + (hasParent1 ? 1 : 0) + (hasParent2 ? 1 : 0);

Expand Down

0 comments on commit 5be6c38

Please sign in to comment.