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,26 @@
- 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
is_caregiver: true
output:
mb_spouse_credit_amount: 4_134

- name: Eligible income spouse lived with but not being taken care of household's head
period: 2023
input:
mb_spouse_credit_eligible: true
spouse_income: 5_000
is_caregiver: false
output:
mb_spouse_credit_amount: 0

- 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
is_caregiver: 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 and spouse is living together
period: 2023
input:
province_code: MB
cohabitating_spouses: true
output:
mb_spouse_credit_eligible: true

- name: Household's head and spouse is not living together
period: 2023
input:
province_code: MB
cohabitating_spouses: 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 = Person
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
label = "Manitoba spouse and common-law partner amoount"
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)
is_caregiver = person("is_caregiver", period)
laviniawo marked this conversation as resolved.
Show resolved Hide resolved

return is_caregiver * (max_(0, (p.base - spouse_income)))
laviniawo marked this conversation as resolved.
Show resolved Hide resolved
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 = Household
label = "Manitoba head eligiblility for recieving spouse's tax credit"
definition_period = YEAR
defined_for = ProvinceCode.MB

def formula(household, period, parameters):
return 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