Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manitoba Spouse or Common-law Partner Amount #432

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
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,14 @@
description: Manitoba provides this spouse and common-law partner amount, which is equivalent to the spouses basic personal amount.
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
values:
2022-01-01: 9_134
metadata:
unit: currency-CAD
period: year
label: Manitoba spouse and commonlaw partner amount credit
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: Government of Canada - 2023 Manitoba spouse and commonlaw partner amount credit
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1
- title: Government of Canada - 2022 Manitoba spouse and commonlaw partner amount credit
href: https://www.gov.mb.ca/finance/personal/pcredits.html#nrtc
- title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(5)
href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(5)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- name: Eligible income spouse lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 5_000
cohabitating_spouses: true
mb_spouse_credit_eligible: true
output:
mb_spouse_credit_amount: 4_134

- name: Eligible income spouse does not lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 5_000
cohabitating_spouses: false
mb_spouse_credit_eligible: true
output:
mb_spouse_credit_amount: 0

- name: ineligible income spouse lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 10_000
cohabitating_spouses: true
mb_spouse_credit_eligible: true
output:
mb_spouse_credit_amount: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- name: Household's head is taking care of the spouse
period: 2023
input:
province_code: MB
is_caregiver: true
output:
mb_spouse_credit_eligible: true

- name: Household's head is not taking care of the spouse
period: 2023
input:
province_code: MB
is_caregiver: false
output:
mb_spouse_credit_eligible: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from policyengine_canada.model_api import *


class mb_spouse_credit_amount(Variable):
value_type = float
entity = Person
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
label = "Manitoba spouse and common law partner amount"
definition_period = YEAR
defined_for = "mb_spouse_credit_eligible"

def formula(person, period, parameters):
laviniawo marked this conversation as resolved.
Show resolved Hide resolved

p = parameters(
period
).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount

spouse_income = person("spouse_income", period)
living_together = person("cohabitating_spouses", period)

credit_amount = max_(0, (p.base - spouse_income))
laviniawo marked this conversation as resolved.
Show resolved Hide resolved

return living_together * credit_amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from policyengine_canada.model_api import *


class mb_spouse_credit_eligible(Variable):
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
value_type = bool
entity = Person
label = "Manitoba head eligiblility for recieving spouse's tax credit"
definition_period = YEAR
defined_for = ProvinceCode.MB

def formula(person, period, parameters):
return person("is_caregiver", period)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe there is another PR that uses similar logic, this is the right way to do this, please adjust in the other PR

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from policyengine_canada.model_api import *


class cohabitating_spouses(Variable):
value_type = bool
entity = Person # Household
label = "Cohabitating spouses"
definition_period = YEAR
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 = "Tax filer is the primary caregiver"
definition_period = YEAR
Loading