-
Notifications
You must be signed in to change notification settings - Fork 35
Nova Scotia Spouse or Common-law Partner Amount #476
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
Draft
okeyiii
wants to merge
5
commits into
PolicyEngine:master
Choose a base branch
from
okeyiii:okeyiii/issue475
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.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ae41e1e
Nova Scotia Spouse or Common-law Partner Amount
okeyiii 6e88be7
Nova Scotia Spouse or Common-law Partner Amount
okeyiii 73d6c6b
Nova Scotia Spouse or Common-law Partner Amount
okeyiii 320175f
Nova Scotia Spouse or Common-law Partner Amount
okeyiii 3fdfc42
Nova Scotia Spouse or Common-law Partner Amount
okeyiii 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 hidden or 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: | ||
| - Nova Scotia spouse and common law partner amount. |
14 changes: 14 additions & 0 deletions
14
...meters/gov/provinces/ns/tax/income/credits/spouse_and_common_law_partner_amount/base.yaml
This file contains hidden or 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: Nova Scotia provides this spouse and common-law partner amount base credit amount. | ||
| values: | ||
| 2022-01-01: 9_329 | ||
| metadata: | ||
| unit: currency-CAD | ||
| period: year | ||
| label: Nova Scotia spouse and common-law partner amount credit base | ||
| reference: | ||
| - title: 2022 Nova Scotia Personal Tax Credits Return | ||
| href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1 | ||
| - title: 2022 Worksheet NS428 | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-c/5003-c-22e.pdf#page=1 | ||
| - title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada - 10C | ||
| href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24 |
15 changes: 15 additions & 0 deletions
15
...ameters/gov/provinces/ns/tax/income/credits/spouse_and_common_law_partner_amount/cap.yaml
This file contains hidden or 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 @@ | ||
| description: Nova Scotia caps the spouse and common-law partner amount credit at this amount. | ||
| values: | ||
| 2023-01-01: 8_481 | ||
| metadata: | ||
| unit: currency-CAD | ||
| period: year | ||
| label: Nova Scotia spouse and common-law partner amount credit cap | ||
| reference: | ||
| - title: 2022 Nova Scotia Personal Tax Credits Return | ||
| href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1 | ||
| - title: 2022 Worksheet NS428 | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-c/5003-c-22e.pdf#page=1 | ||
| # The legal code does not specify the maximum credit amount | ||
| - title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada - 10C | ||
| href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24 | ||
56 changes: 56 additions & 0 deletions
56
...vinces/ns/tax/income/credits/spouse_and_common_law_partner_amount_credit/integration.yaml
This file contains hidden or 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,56 @@ | ||
| - name: Integration - spouse with income <= 848 | ||
| period: 2023 | ||
| absolute_error_margin: 0.01 | ||
| input: | ||
| people: | ||
| parent1: | ||
| age: 40 | ||
| individual_net_income: 20_000 | ||
| parent2: | ||
| age: 39 | ||
| is_spouse: true | ||
| individual_net_income: 0 | ||
| household: | ||
| members: [parent1, parent2] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 8_481 | ||
|
|
||
| - name: Integration - spouse with 848<= income <= 9329 | ||
| period: 2023 | ||
| absolute_error_margin: 0.01 | ||
| input: | ||
| people: | ||
| parent1: | ||
| age: 40 | ||
| individual_net_income: 20_000 | ||
| parent2: | ||
| age: 39 | ||
| is_spouse: true | ||
| individual_net_income: 849 | ||
| household: | ||
| members: [parent1, parent2] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 8_480 | ||
|
|
||
| - name: Integration - spouse with income >= 9329 | ||
| period: 2023 | ||
| absolute_error_margin: 0.01 | ||
| input: | ||
| people: | ||
| parent1: | ||
| age: 40 | ||
| individual_net_income: 20_000 | ||
| parent2: | ||
| age: 39 | ||
| is_spouse: true | ||
| individual_net_income: 9_400 | ||
| household: | ||
| members: [parent1, parent2] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 0 |
117 changes: 117 additions & 0 deletions
117
..._and_common_law_partner_amount_credit/ns_spouse_and_common_law_partner_amount_credit.yaml
This file contains hidden or 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,117 @@ | ||
| - name: Househod with no spouse income | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| head: | ||
| spouse_income: 0 | ||
| spouse: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 8_481 | ||
|
|
||
| - name: Not married are not eligible for an amount | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head] | ||
| province_code: NS | ||
| is_married: false | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 0 | ||
|
|
||
| - name: House hold with spouse income lower than 848 | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 847 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 8_481 | ||
|
|
||
| - name: House hold with spouse income between (848, 9_329) | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 849 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 8_480 | ||
|
|
||
| - name: House hold with spouse income between (848, 9_329) | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 9_328 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 1 | ||
|
|
||
| - name: House hold with spouse income between (848, 9_329) 2 | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 9_000 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 329 | ||
|
|
||
| - name: House hold with spouse income is 9_329 | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 9_329 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 0 | ||
|
|
||
| - name: House hold with spouse income more than 9_329 | ||
| period: 2023 | ||
| input: | ||
| people: | ||
| spouse: | ||
| spouse_income: 9_400 | ||
| head: | ||
| spouse_income: 0 | ||
| household: | ||
| members: [head, spouse] | ||
| province_code: NS | ||
| is_married: true | ||
| output: | ||
| ns_spouse_and_common_law_partner_amount_credit: 0 |
28 changes: 28 additions & 0 deletions
28
...les/gov/provinces/ns/tax/income/credits/ns_spouse_and_common_law_partner_amount_credit.py
This file contains hidden or 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,28 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class ns_spouse_and_common_law_partner_amount_credit(Variable): | ||
| value_type = float | ||
| entity = Household | ||
| label = "Nova Scotia spouse and common-law partner amount credit" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| defined_for = ProvinceCode.NS | ||
| reference = ( | ||
| "https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1", | ||
| "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-c/5003-c-22e.pdf#page=1", | ||
| "https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24", | ||
| ) | ||
|
|
||
| def formula(household, period, parameters): | ||
| person = household.members | ||
| total_spouse_income = add(household, period, ["spouse_income"]) | ||
| p = parameters( | ||
| period | ||
| ).gov.provinces.ns.tax.income.credits.spouse_and_common_law_partner_amount | ||
|
|
||
| reduced_base_amount = max_(0, (p.base - total_spouse_income)) | ||
| # Adding married condition to avoid amount for single filers | ||
| is_married = household("is_married", period) | ||
| capped_credit = min_(p.cap, reduced_base_amount) | ||
| return capped_credit * is_married |
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.
Uh oh!
There was an error while loading. Please reload this page.