diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 200a74ffc..94f8a2faf 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Nova Scotia pension income amount. \ No newline at end of file + - Nova Scotia pension income amount. diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/cap.yaml similarity index 72% rename from policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/max_amount.yaml rename to policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/cap.yaml index 18d30938e..12f2bbe45 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/max_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/pension_income_amount/cap.yaml @@ -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 diff --git a/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount b/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.yaml similarity index 77% rename from policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount rename to policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.yaml index b8ad824c6..86104eef7 100644 --- a/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount +++ b/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.yaml @@ -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 diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount b/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.py similarity index 73% rename from policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount rename to policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.py index 06da6ad72..553c48b87 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_pension_income_amount.py @@ -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 @@ -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) \ No newline at end of file + return min_(pension_income_amount, cap)