Skip to content

Commit

Permalink
Manitoba Spouse or Common-law Partner Amount
Browse files Browse the repository at this point in the history
  • Loading branch information
laviniawo committed Aug 14, 2023
1 parent 680c5bc commit 4a29d78
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
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.
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
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
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
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
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
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
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

0 comments on commit 4a29d78

Please sign in to comment.