From 91159bb0e707acbb2ec08a8c0474bbd0d1392f91 Mon Sep 17 00:00:00 2001 From: Yiwei Jia Date: Wed, 22 Nov 2023 22:28:17 -0500 Subject: [PATCH 1/5] British Columbia Basic Personal Amount Fixes #466 --- changelog_entry.yaml | 4 ++++ .../credits/basic_personal_amount/base.yaml | 13 +++++++++++++ .../bc_basic_personal_amount.yaml | 13 +++++++++++++ .../bc_basic_personal_amount.py | 17 +++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml create mode 100644 policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml create mode 100644 policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..e171e6234 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - British Columbia basic personal amount. diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml new file mode 100644 index 000000000..c3540bb50 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml @@ -0,0 +1,13 @@ +description: British Columbia provides the following basic personal amount. +values: + 2022-01-01: 11_302 + 2023-01-01: 11_981 +metadata: + unit: currency-CAD + label: British Columbia basic personal amount + reference: + - title: 2022 British Columbia, Personal Tax Credits Return, TD1BC + href: https://tsaykeh.com/files/pdf/1650179447_BC%20Tax%20Form.pdf#page=1 + - title: 2023 British Columbia, Personal Tax Credits Return, TD1BC + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1 +# The British Columbia Income Tax Act does not have a separate section describing the basic personal amount diff --git a/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml b/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml new file mode 100644 index 000000000..25c777f80 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml @@ -0,0 +1,13 @@ +- name: 2023 Basic personal amount + period: 2023 + input: + province_code: BC + output: + bc_basic_personal_amount: 11_981 + +- name: 2022 Basic personal amount + period: 2022 + input: + province_code: BC + output: + bc_basic_personal_amount: 11_302 diff --git a/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py b/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py new file mode 100644 index 000000000..1f6f9f1ea --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py @@ -0,0 +1,17 @@ +from policyengine_canada.model_api import * + + +class bc_basic_personal_amount(Variable): + value_type = float + entity = Person + label = "British Columbia basic personal amount" + unit = CAD + definition_period = YEAR + reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1" + defined_for = ProvinceCode.BC + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.bc.tax.income.credits.basic_personal_amount + return p.base From f9a7883ce32b87b5f759992e46c2d566322db9f4 Mon Sep 17 00:00:00 2001 From: Yiwei Jia Date: Thu, 21 Dec 2023 15:03:26 -0500 Subject: [PATCH 2/5] Updated Reference --- .../bc/tax/income/credits/basic_personal_amount/base.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml index c3540bb50..c4b9a25a8 100644 --- a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml +++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml @@ -10,4 +10,6 @@ metadata: href: https://tsaykeh.com/files/pdf/1650179447_BC%20Tax%20Form.pdf#page=1 - title: 2023 British Columbia, Personal Tax Credits Return, TD1BC href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1 + - title: Canada Basic Personal Amount + href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/deductions-credits-expenses/line-30000-basic-personal-amount.html # The British Columbia Income Tax Act does not have a separate section describing the basic personal amount From 0ed0e9f460483c682488c3aa2c12585584e2c9e3 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 29 Feb 2024 03:26:17 +0100 Subject: [PATCH 3/5] fromat --- .../bc/tax/income/credits/basic_personal_amount/base.yaml | 4 +--- .../provinces/bc/tax/income/credits/non_refundable.yaml | 7 +++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml index c4b9a25a8..9a481d59c 100644 --- a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml +++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml @@ -4,12 +4,10 @@ values: 2023-01-01: 11_981 metadata: unit: currency-CAD + period: year label: British Columbia basic personal amount reference: - title: 2022 British Columbia, Personal Tax Credits Return, TD1BC href: https://tsaykeh.com/files/pdf/1650179447_BC%20Tax%20Form.pdf#page=1 - title: 2023 British Columbia, Personal Tax Credits Return, TD1BC href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1 - - title: Canada Basic Personal Amount - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/deductions-credits-expenses/line-30000-basic-personal-amount.html -# The British Columbia Income Tax Act does not have a separate section describing the basic personal amount diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml index f3d40c64f..0286b63e5 100644 --- a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml +++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml @@ -1,8 +1,11 @@ -description: British Columbia list of non-refundable tax credits. +description: British Columbia provides the following non-refundable tax credits. values: 2022-01-01: - bc_tax_reduction_credit - bc_age_credit + - bc_basic_personal_amount metadata: - unit: program + unit: list + period: year + label: British Columbia non-refundable tax credits From d4a31fbcaac5f5c12b4b439a2dd289404d48a37e Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 29 Feb 2024 03:28:29 +0100 Subject: [PATCH 4/5] format --- .../bc/tax/income/credits/basic_personal_amount/base.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml index 9a481d59c..5400c9729 100644 --- a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml +++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml @@ -11,3 +11,6 @@ metadata: href: https://tsaykeh.com/files/pdf/1650179447_BC%20Tax%20Form.pdf#page=1 - title: 2023 British Columbia, Personal Tax Credits Return, TD1BC href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1 + # The income tax act specifies inflation unadjusted amounts + - title: British Columbia Income Tax Act, Division 2, 4.3, 1.1 + href: https://www.bclaws.gov.bc.ca/civix/document/id/complete/statreg/96215_01 From 6a47ad384354c1ac6661d9fb35f6cd581d677a69 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 29 Feb 2024 03:37:38 +0100 Subject: [PATCH 5/5] delete int. test --- .../tests/gov/integration.yaml | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/policyengine_canada/tests/gov/integration.yaml b/policyengine_canada/tests/gov/integration.yaml index a10b8a3ec..9cfc3e277 100644 --- a/policyengine_canada/tests/gov/integration.yaml +++ b/policyengine_canada/tests/gov/integration.yaml @@ -88,33 +88,3 @@ benefits: 3_706 income_tax_before_refundable_credits: 0 income_tax_before_credits: 0 - - -- name: Integration - British Columbia - period: 2023 - absolute_error_margin: 0.5 - input: - people: - parent: - age: 40 - bc_taxable_income: 10_000 - c1: - age: 12 - full_custody: false - household: - members: [parent, c1] - province_code_str: BC - adjusted_family_net_income: 20_000 - is_married: false - family_working_income: 3_000 - output: - on_non_refundable_credits: 0 - on_refundable_credits: 0 - on_benefits: 0 - household_net_income: 4_551.46 - bc_non_refundable_credits: 521 - bc_refundable_credits: 386.9 - bc_benefits: 1_599.96 - non_refundable_tax_credits: 15_000 - income_tax_before_refundable_credits: 0 - income_tax_before_credits: 0