-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #473 Add initial param, var, test
- Loading branch information
Showing
5 changed files
with
65 additions
and
2 deletions.
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
|
||
- bump: minor | ||
changes: | ||
added: | ||
- Nova Scotia pension income amount. |
1 change: 0 additions & 1 deletion
1
...yengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension/pension_amount.yaml
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...nada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/max_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,14 @@ | ||
description: Nova Scotia max amount for pension income amount. | ||
values: | ||
2022-01-01: 1_173 | ||
metadata: | ||
unit: currency-CAD | ||
label: Nova Scotia pension income amount max amount | ||
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 | ||
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28 | ||
|
24 changes: 24 additions & 0 deletions
24
policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount
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,24 @@ | ||
- name: Person has pension income lower than 1_173 | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
pension_and_savings_plan_income: 1_172 | ||
output: | ||
ns_pension_income_amount: 1_172 | ||
|
||
- name: Person has pension income equal to 1_173 | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
pension_and_savings_plan_income: 1_173 | ||
output: | ||
ns_pension_income_amount: 1_173 | ||
|
||
- name: Person has pension income higher than 1_173 | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
pension_and_savings_plan_income: 1_180 | ||
output: | ||
ns_pension_income_amount: 1_173 | ||
|
23 changes: 23 additions & 0 deletions
23
policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount
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,23 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class ns_pension_income_amount(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Nova Scotia Pension Income Amount" | ||
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=28", | ||
) | ||
|
||
def formula(person, period, parameters): | ||
max_amount = parameters( | ||
period | ||
).gov.provinces.ns.tax.income.credits.pension_income_amount.max_amount | ||
pension_income_amount = person("pension_and_savings_plan_income", period) | ||
|
||
return min(pension_income_amount, max_amount) |