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 4a29d78 commit b55f78c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 74 deletions.
4 changes: 2 additions & 2 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- bump: minor
changes:
added:
- Manitoba spouse and common-law partner amount.
added:
- Manitoba spouse and common-law partner amount.
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_head_eligibility: true

- name: Household's head is not taking care of the spouse
period: 2023
input:
province_code: MB
is_caregiver: false
output:
mb_head_eligibility: false
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
- name: Eligible spouse with household's head not taking care of her
- name: Eligible income spouse lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 5_000
is_caregiver: false
mb_spouse_eligibility: true
lived_together: true
mb_head_eligibility: true
output:
mb_spouse_credit_amount: 0
mb_spouse_credit_amount: 4_134

- name: Eligible spouse with household's head taking care of her
- name: Eligible income spouse does not lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 5_000
is_caregiver: true
mb_spouse_eligibility: true
lived_together: false
mb_head_eligibility: true
output:
mb_spouse_credit_amount: 4_134
mb_spouse_credit_amount: 0

- name: ineligible income spouse lived with household's head
period: 2023
input:
province_code: MB
spouse_income: 10_000
lived_together: true
mb_head_eligibility: true
output:
mb_spouse_credit_amount: 0

This file was deleted.

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


class mb_head_eligibility(Variable):
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)
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ class mb_spouse_credit_amount(Variable):
entity = Person
label = "Manitoba spouse and commonlaw partner net income"
definition_period = YEAR
defined_for = ProvinceCode.MB
defined_for = "mb_head_eligibility"

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)
living_together = person("lived_together", period)

spouse_credit_amount = (
caregiver
* person("mb_spouse_eligibility", period)
* (p.base_amount - spouse_income)
)

return spouse_credit_amount
return living_together * (max_(0, (p.base_amount - spouse_income)))

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ 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 b55f78c

Please sign in to comment.