forked from PolicyEngine/policyengine-canada
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes PolicyEngine#419 Tests to be done
- Loading branch information
Showing
9 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- Manitoba renters tax credit amount. |
9 changes: 9 additions & 0 deletions
9
..._canada/parameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/age_amount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides different tax credits according to different age groups. | ||
values: | ||
2022-01-01: 65 | ||
metadata: | ||
unit: year | ||
label: Manitoba tax credit diference with people with different ages | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf # page=3 |
9 changes: 9 additions & 0 deletions
9
...ameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/applicable_percentage.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides this specific percentage rate to renters tax credit. | ||
values: | ||
2022-01-01: 0.0075 | ||
metadata: | ||
unit: currency-CAD | ||
label: Manitoba renters tax credit rate | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf #page=3 |
9 changes: 9 additions & 0 deletions
9
...canada/parameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/base_amount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides this basic credit amount for either the head or the spouse having age of older than or equal to 65. | ||
values: | ||
2022-01-01: 825 | ||
metadata: | ||
unit: currency-CAD | ||
label: Manitoba basic credit amount of renters tax credit for either the head or the spouse having eligible age | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf #page=3 |
9 changes: 9 additions & 0 deletions
9
...anada/parameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/credit_value.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides this credit value for renters tax credit calculation. | ||
values: | ||
2022-01-01: 43.75 | ||
metadata: | ||
unit: currency-CAD | ||
label: Manitoba credit value of renters tax credit | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf #page=3 |
9 changes: 9 additions & 0 deletions
9
...e_canada/parameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/max_value.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides this maximum value for renters tax credit calculation. | ||
values: | ||
2022-01-01: 300 | ||
metadata: | ||
unit: currency-CAD | ||
label: Manitoba maximum value of renters tax credit in calculation | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf #page=3 |
9 changes: 9 additions & 0 deletions
9
...ada/parameters/gov/provinces/mb/tax/income/credits/renters_tax_credit/months_in_year.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Manitoba provides the certain time amount for education property tax credit calculations. | ||
values: | ||
2022-01-01: 365 | ||
metadata: | ||
unit: year | ||
label: Manitoba time amount for education property tax credit calculations | ||
reference: | ||
- title: Manitoba Information Guide Manitoba Credits Form MB479 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5007-tc/5007-tc-22e.pdf # page=3 |
50 changes: 50 additions & 0 deletions
50
...variables/gov/provinces/mb/tax/income/credits/renters_tax_credit/mb_renters_tax_credit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class mb_renters_tax_credit(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Manitoba renters tax credit" | ||
unit = CAD | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.MB | ||
|
||
def formula(person, period, parameters): | ||
p = parameters( | ||
period | ||
).gov.provinces.mb.tax.income.credits.renters_tax_credit | ||
|
||
age = person("age", period) | ||
age_eligible = age >= p.age_amount | ||
|
||
# household net income | ||
net_income = person("adjusted_family_net_income", period) | ||
|
||
# rent | ||
rent = person("rent", period) | ||
|
||
# education property tax credit | ||
### waiting for issue418 to use this variable | ||
education_property_tax_credit = person( | ||
"mb_education_property_tax_credit_amount", period | ||
) | ||
|
||
max_amount_allowed = min_( | ||
p.max_value, net_income * p.applicable_percentage | ||
) | ||
|
||
age_eligible_credit = age_eligible * ( | ||
(p.base_amount - max_amount_allowed) / p.months_in_year | ||
) | ||
max_tax_credit = max_(age_eligible_credit, p.credit_value) | ||
|
||
number_of_months_in_rentals = person( | ||
"months_living_in_rentals", period | ||
) | ||
|
||
renters_tax_credit_amount = ( | ||
min_(max_tax_credit * number_of_months_in_rentals, rent) | ||
+ education_property_tax_credit | ||
) | ||
|
||
return renters_tax_credit_amount |
9 changes: 9 additions & 0 deletions
9
policyengine_canada/variables/household/expenses/housing/months_living_in_rentals.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class months_living_in_rentals(Variable): | ||
value_type = int | ||
entity = Person | ||
label = "Time Livining in Rentals" | ||
documentation = "Total number of months living in rental places" | ||
definition_period = YEAR |