Skip to content

Commit 9aef9ff

Browse files
committed
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/policyengine-canada into abcaregiveramount
2 parents 42dffa6 + bc93764 commit 9aef9ff

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

policyengine_canada/variables/gov/provinces/ab/tax/credits_return/ab_caregiver_amount.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ class ab_caregiver_amount(Variable):
88
unit = CAD
99
definition_period = YEAR
1010
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf"
11-
defined_for = ProvinceCode.AB
11+
defined_for = "ab_caregiver_amount_eligible_person"
1212

1313
def formula(person, period, parameters):
1414
p = parameters(
1515
period
1616
).gov.provinces.ab.tax.income.credits.credits_return
1717

1818
# Whether the person is eligible or not (income based)
19-
income_eligibility = person("ab_caregiver_amount_eligible", period)
2019

2120
net_income = max_(
2221
0, p.upper_dependant_income_threshold - person("ab_dependant_net_income", period)
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from policyengine_canada.model_api import *
22

33

4-
class ab_caregiver_amount_eligible(Variable):
5-
value_type = float
4+
class ab_caregiver_amount_eligible_person(Variable):
5+
value_type = bool
66
entity = Person
7-
label = "Alberta caregiver amount income eligibility"
8-
unit = CAD
7+
label = "Eligible person for the Alberta caregiver amount"
98
definition_period = YEAR
109
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf"
1110
defined_for = ProvinceCode.AB
@@ -17,8 +16,7 @@ def formula(person, period, parameters):
1716

1817
dependant_net_income = person("ab_dependant_net_income", period) * eligible_dependant
1918

20-
income_eligibility = (
19+
return (
2120
dependant_net_income <= p.upper_dependant_income_threshold
2221
)
2322

24-
return income_eligibility

0 commit comments

Comments
 (0)