-
Notifications
You must be signed in to change notification settings - Fork 33
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
laviniawo
wants to merge
10
commits into
PolicyEngine:master
Choose a base branch
from
laviniawo:laviniawo/issue340
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4a29d78
Manitoba Spouse or Common-law Partner Amount
laviniawo b55f78c
Manitoba Spouse or Common-law Partner Amount
laviniawo 5df18d0
Manitoba Spouse or Common-law Partner Amount
laviniawo bf4547c
modifications
laviniawo 95c7a55
modifications on reference
laviniawo 81239af
fixes
laviniawo 0858ef7
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
laviniawo c77e1c3
resolve comments
laviniawo 0f93736
Merge branch
laviniawo 8363359
changes made upon request
laviniawo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
14 changes: 14 additions & 0 deletions
14
...ameters/gov/provinces/mb/tax/income/credits/spouse_or_common_law_partner_amount/base.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
15 changes: 15 additions & 0 deletions
15
...s/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_amount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
26 changes: 26 additions & 0 deletions
26
...mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_eligible.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
19 changes: 19 additions & 0 deletions
19
...ces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_amount.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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) |
14 changes: 14 additions & 0 deletions
14
...s/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_eligible.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
8 changes: 8 additions & 0 deletions
8
policyengine_canada/variables/household/person/cohabitating_spouses.py
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
8 changes: 8 additions & 0 deletions
8
policyengine_canada/variables/household/person/is_caregiver.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?