Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
karenlilr committed Jul 31, 2024
1 parent 1822c7d commit 949d624
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
3 changes: 1 addition & 2 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- bump: minor
changes:
added:
- New Brunswick Spouse or Common-law Partner base amount for the years 2022, 2023, and 2024; nb_spouse_and_common_law_partner_amount_credit to calculate the credit dynamically based on parameters; test cases; parameter configurations for base_amount and max_credit in the parameters file.
added: New Brunswick Spouse or Common-law Partner base amount.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ values:
metadata:
unit: currency-CAD
period: year
label: New Brunswick Spouse or Common-law Partner Base Amount
label: New Brunswick Spouse or Common-law Partner base Amount
reference:
- title: Worksheet for the 2022 New Brunswick Personal Tax Credits Return
href: https://www.cchwebsites.com/content/pdf/tax_forms/ca/en/td1nbws_en.pdf#page=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
description: The New Brunswick spouse or common-law partner amount credit is calculated by taking into account the spouse's net income and comparing it to a base amount. The maximum credit is the highest amount that can be claimed as a credit.
description: New Brunswick provides the following maximum spouse or common-law partner amount.
values:
2022-01-01: 9_186
2023-01-01: 9_764
2024-01-01: 10_223
metadata:
unit: currency-CAD
period: year
label: New Brunswick Spouse or Common-law Partner Max Credit
label: New Brunswick Spouse or Common-law Partner max Credit
reference:
- title: Worksheet for the 2022 New Brunswick Personal Tax Credits Return
href: https://www.cchwebsites.com/content/pdf/tax_forms/ca/en/td1nbws_en.pdf#page=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,5 @@


parameters:
gov:
provinces:
nb:
tax:
income:
credits:
spouse_or_common_law_partner_amount:
base_amount:
2022-01-01: 10_105
2023-01-01: 10_741
2024-01-01: 11_246
max_credit:
2022-01-01: 9_186
2023-01-01: 9_764
2024-01-01: 10_223


Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ class nb_spouse_and_common_law_partner_amount_credit(Variable):

def formula(household, period, parameters):
p = parameters(period).gov.provinces.nb.tax.income.credits.spouse_or_common_law_partner_amount
base_amount = p.base_amount
max_credit = p.max_credit


spouse_income = add(household, period, ["spouse_income"])
reduced_amount = max_(base_amount - spouse_income, 0)
return min(max_credit, reduced_amount)
reduced_amount = max_(p.base_amount - spouse_income, 0)
return min(p.max_credit, reduced_amount)

0 comments on commit 949d624

Please sign in to comment.