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.
Manitoba Spouse or Common-law Partner Amount
Fixes PolicyEngine#340
- Loading branch information
Showing
8 changed files
with
130 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 spouse and common-law partner amount. |
10 changes: 10 additions & 0 deletions
10
.../gov/provinces/mb/tax/income/credits/spouse_or_common_law_partner_amount/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,10 @@ | ||
description: Manitoba provides this spouse and common-law partner amount, which is equivalent to the spouses basic personal amount. | ||
values: | ||
2023-01-01: 9_134 | ||
metadata: | ||
unit: currency-CAD | ||
period: year | ||
label: Manitoba spouse and commonlaw partner amount credit. | ||
reference: | ||
- title: Government of Canada - Manitoba spouse and commonlaw partner amount credit | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 |
19 changes: 19 additions & 0 deletions
19
...s/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_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,19 @@ | ||
- name: Eligible spouse with household's head not taking care of her | ||
period: 2023 | ||
input: | ||
province_code: MB | ||
spouse_income: 5_000 | ||
is_caregiver: false | ||
mb_spouse_eligibility: true | ||
output: | ||
mb_spouse_credit_amount: 0 | ||
|
||
- name: Eligible spouse with household's head taking care of her | ||
period: 2023 | ||
input: | ||
province_code: MB | ||
spouse_income: 5_000 | ||
is_caregiver: true | ||
mb_spouse_eligibility: true | ||
output: | ||
mb_spouse_credit_amount: 4_134 |
29 changes: 29 additions & 0 deletions
29
...vinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_eligible.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,29 @@ | ||
- name: Spouse not living with household's head | ||
period: 2023 | ||
input: | ||
province_code: MB | ||
is_spouse: true | ||
lived_together: false | ||
spouse_income: 5_000 | ||
output: | ||
mb_spouse_eligibility: false | ||
|
||
- name: Spouse does not have eligible income and lived with household's head | ||
period: 2023 | ||
input: | ||
province_code: MB | ||
is_spouse: true | ||
lived_together: true | ||
spouse_income: 10_000 | ||
output: | ||
mb_spouse_eligibility: false | ||
|
||
- name: Spouse has eligible income and lived with household's head | ||
period: 2023 | ||
input: | ||
province_code: MB | ||
is_spouse: true | ||
lived_together: true | ||
spouse_income: 5_000 | ||
output: | ||
mb_spouse_eligibility: true |
27 changes: 27 additions & 0 deletions
27
...x/income/credits/spouse_and_common_law_partner_amount/spouse_and_common_law_tax_amount.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,27 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class mb_spouse_credit_amount(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Manitoba spouse and commonlaw partner net income" | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.MB | ||
|
||
def formula(person, period, parameters): | ||
|
||
p = parameters( | ||
period | ||
).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount | ||
|
||
caregiver = person("is_caregiver", period) | ||
|
||
spouse_income = person("spouse_income", period) | ||
|
||
spouse_credit_amount = ( | ||
caregiver | ||
* person("mb_spouse_eligibility", period) | ||
* (p.base_amount - spouse_income) | ||
) | ||
|
||
return spouse_credit_amount |
24 changes: 24 additions & 0 deletions
24
...s/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_income_eligibility.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,24 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class mb_spouse_eligibility(Variable): | ||
value_type = bool | ||
entity = Person | ||
label = "Manitoba spouse and commonlaw partner eligibility" | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.MB | ||
|
||
def formula(person, period, parameters): | ||
p = parameters( | ||
period | ||
).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount | ||
|
||
spouse = person("is_spouse", period) | ||
living_together = person("lived_together", period) | ||
spouse_income_eligible = ( | ||
person("spouse_income", period) < p.base_amount | ||
) | ||
|
||
spouse_eligibility = spouse & living_together & spouse_income_eligible | ||
|
||
return spouse_eligibility |
8 changes: 8 additions & 0 deletions
8
policyengine_canada/variables/household/person/is_caregiver.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,8 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class is_caregiver(Variable): | ||
value_type = bool | ||
entity = Person | ||
label = "Is the caregiver" | ||
definition_period = YEAR |
9 changes: 9 additions & 0 deletions
9
policyengine_canada/variables/household/person/lived_together.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 lived_together(Variable): | ||
value_type = bool | ||
entity = Person | ||
label = "Lived together with the tax filer" | ||
unit = CAD | ||
definition_period = YEAR |