Skip to content

Commit

Permalink
Nova Scotia Pension Income Amount
Browse files Browse the repository at this point in the history
Fixes #473

rename max_amount to cap and add one more test
  • Loading branch information
okeyiii committed Dec 10, 2023
1 parent b8354e2 commit 4715eb6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- bump: minor
changes:
added:
- Nova Scotia pension income amount.
- Nova Scotia pension income amount.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
description: Nova Scotia max amount for pension income amount.
description: Nova Scotia caps the pension income amount at this amount.
values:
2022-01-01: 1_173
2017-01-01: 1_173
metadata:
unit: currency-CAD
label: Nova Scotia pension income amount max amount
period: year
label: Nova Scotia pension income amount 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
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada - 10H
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28

Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@
output:
ns_pension_income_amount: 1_173

- name: Person has pension income 0
period: 2023
input:
province_code: NS
pension_and_savings_plan_income: 0
output:
ns_pension_income_amount: 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class ns_pension_income_amount(Variable):
value_type = float
entity = Person
label = "Nova Scotia Pension Income Amount"
label = "Nova Scotia pension income amount"
unit = CAD
definition_period = YEAR
defined_for = ProvinceCode.NS
Expand All @@ -15,9 +15,11 @@ class ns_pension_income_amount(Variable):
)

def formula(person, period, parameters):
max_amount = parameters(
cap = parameters(
period
).gov.provinces.ns.tax.income.credits.pension_income_amount.max_amount
pension_income_amount = person("pension_and_savings_plan_income", period)
).gov.provinces.ns.tax.income.credits.pension_income_amount.cap
pension_income_amount = person(
"pension_and_savings_plan_income", period
)

return min(pension_income_amount, max_amount)
return min_(pension_income_amount, cap)

0 comments on commit 4715eb6

Please sign in to comment.