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, equivalent to the spouses basic personal amount.
values:
2022-01-01: 9_134
metadata:
unit: currency-CAD
period: year
label: Manitoba spouse and common-law partner credit amount
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)(i)
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,15 @@
- name: Eligible income spouse lived with and being taken care of household's head
period: 2023
input:
mb_spouse_credit_eligible: true
spouse_income: 5_000
output:
mb_spouse_credit_amount: 4_134

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

- name: Household's head is taking care of but not living together with spouse
period: 2023
input:
province_code: MB
cohabitating_spouses: false
is_caregiver: true
output:
mb_spouse_credit_eligible: false

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


class mb_spouse_credit_amount(Variable):
value_type = float
entity = Household
Copy link
Contributor

Choose a reason for hiding this comment

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

@PavelMakarchuk I'm not sure about this, does this need people test since the entity is household?

label = "Manitoba spouse and common-law partner amoount"
definition_period = YEAR
defined_for = "mb_spouse_credit_eligible"

def formula(household, period, parameters):
person = household.members
p = parameters(
period
).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount

spouse_income = person("spouse_income", period)

return max_(0, p.base - spouse_income)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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 = Household
label = "Manitoba head eligiblility for recieving spouse's tax credit"
definition_period = YEAR
defined_for = ProvinceCode.MB

def formula(household, period, parameters):
person = household.members
is_caregiver = person("is_caregiver", period)
return is_caregiver * household("cohabitating_spouses", 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 = 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