From b11dea02a691909429e9eb3586f7147d7a42782d Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 22 May 2023 23:26:07 +0000 Subject: [PATCH 01/69] First Parameter --- .../income/credits/canada_employment_amount/amount.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml new file mode 100644 index 000000000..cf7c9be02 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml @@ -0,0 +1,9 @@ +description: Canada Employment Amount. +values: + 2022-01-01: 1_287 +metadata: + unit: currency-CAD + label: Canada Employment Amount + reference: + - title: Government of Canada - Canada Employment 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-31260-canada-employment-amount.html \ No newline at end of file From e446cdec16bfec353ddc72028df9121e984b8799 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 5 Jun 2023 21:39:43 +0000 Subject: [PATCH 02/69] finish yt employment benefit --- .../yt/benefits/employment_benefit.yaml | 9 +++++++ .../income/benefits/yt_employment_amount.yaml | 24 +++++++++++++++++++ .../yt_employment_benefit.py | 19 +++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml create mode 100644 policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml create mode 100644 policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml new file mode 100644 index 000000000..be7b7d92b --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml @@ -0,0 +1,9 @@ +description: Yukon Guide of Canada provides employment amount to claim work-related expenses +values: + 2022-01-01: 1_287 +metadata: + unit: currency-CAD + label: Canada Employment Amount for Yukon + reference: + - title: Canada Employment Amount Benefit for Yukon + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 \ No newline at end of file diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml new file mode 100644 index 000000000..062d0b1a5 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml @@ -0,0 +1,24 @@ +- name: tax return with maximum amount + period: 2022 + input: + province_code: YT + benefits_income: 30000 + output: + yt_employment_benefit: 1_287 + +- name: tax return for no income + period: 2022 + input: + province_code: YT + benefits_income: 0 + output: + yt_employment_benefit: 0 + +- name: tax return for income under maximum amount + period: 2022 + input: + province_code: YT + benefits_income: 1_000 + output: + yt_employment_benefit: 1_000 + diff --git a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py new file mode 100644 index 000000000..29103f38d --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py @@ -0,0 +1,19 @@ +from policyengine_canada.model_api import * + + +class yt_employment_benefit(Variable): + value_type = float + entity = Person + label = "Yukon Employment Amount" + unit = CAD + definition_period = YEAR + defined_for = ProvinceCode.YT + reference = "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-31260-canada-employment-amount.html" + + def formula(household, period, parameters): + income = parameters(period).gov.provinces.yt.benefits.employment_benefit + + benefits_income = household("benefits_income", period) + + return min_(benefits_income, income) + From 79f1e4f9669f78b52a5a4d73357b57b5ac68b928 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:14:51 +0000 Subject: [PATCH 03/69] fix issues 285 --- changelog_entry.yaml | 4 ++++ .../gov/provinces/yt/benefits/employment_benefit.yaml | 2 +- .../income/credits/canada_employment_amount/amount.yaml | 2 +- .../yukon_employment_benefit/yt_employment_benefit.py | 7 ++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..9cbbabb36 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Yukon Employment Benefit. diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml index be7b7d92b..14d2eb432 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml @@ -6,4 +6,4 @@ metadata: label: Canada Employment Amount for Yukon reference: - title: Canada Employment Amount Benefit for Yukon - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 \ No newline at end of file + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml index cf7c9be02..f1cc3cb18 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml @@ -6,4 +6,4 @@ metadata: label: Canada Employment Amount reference: - title: Government of Canada - Canada Employment 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-31260-canada-employment-amount.html \ No newline at end of file + 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-31260-canada-employment-amount.html diff --git a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py index 29103f38d..3c1175dd5 100644 --- a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py +++ b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py @@ -11,9 +11,10 @@ class yt_employment_benefit(Variable): reference = "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-31260-canada-employment-amount.html" def formula(household, period, parameters): - income = parameters(period).gov.provinces.yt.benefits.employment_benefit - + income = parameters( + period + ).gov.provinces.yt.benefits.employment_benefit + benefits_income = household("benefits_income", period) return min_(benefits_income, income) - From fabc5e88df78cf3063c16f40af452d542d590156 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:25:40 +0000 Subject: [PATCH 04/69] modify 285 --- .../gov/provinces/yt/benefits/employment_benefit.yaml | 4 ++-- .../credits/canada_employment_amount/amount.yaml | 9 --------- .../income/credits/sa/qc_sa_married_both_eligible.yaml | 2 +- .../income/credits/sa/qc_sa_married_one_eligible.yaml | 2 +- .../yt/tax/income/benefits/yt_employment_amount.yaml | 6 +++--- .../yukon_employment_benefit/yt_employment_benefit.py | 10 +++++----- 6 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml index 14d2eb432..37d11e455 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml @@ -1,9 +1,9 @@ -description: Yukon Guide of Canada provides employment amount to claim work-related expenses +description: Yukon provides this employment amount. values: 2022-01-01: 1_287 metadata: unit: currency-CAD - label: Canada Employment Amount for Yukon + label: Yukon Employment Amount reference: - title: Canada Employment Amount Benefit for Yukon href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml deleted file mode 100644 index f1cc3cb18..000000000 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/canada_employment_amount/amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Canada Employment Amount. -values: - 2022-01-01: 1_287 -metadata: - unit: currency-CAD - label: Canada Employment Amount - reference: - - title: Government of Canada - Canada Employment 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-31260-canada-employment-amount.html diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml index fcfcb7cb6..8f78cb520 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml @@ -29,4 +29,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_both_eligible: 1 \ No newline at end of file + qc_sa_married_both_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml index 6ce860c0e..fd8414b26 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml @@ -28,4 +28,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_one_eligible: 1 \ No newline at end of file + qc_sa_married_one_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml index 062d0b1a5..d178b0677 100644 --- a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml @@ -2,7 +2,7 @@ period: 2022 input: province_code: YT - benefits_income: 30000 + employment_income: 30000 output: yt_employment_benefit: 1_287 @@ -10,7 +10,7 @@ period: 2022 input: province_code: YT - benefits_income: 0 + employment_income: 0 output: yt_employment_benefit: 0 @@ -18,7 +18,7 @@ period: 2022 input: province_code: YT - benefits_income: 1_000 + employment_income: 1_000 output: yt_employment_benefit: 1_000 diff --git a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py index 3c1175dd5..fa8d34b93 100644 --- a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py +++ b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py @@ -8,13 +8,13 @@ class yt_employment_benefit(Variable): unit = CAD definition_period = YEAR defined_for = ProvinceCode.YT - reference = "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-31260-canada-employment-amount.html" + reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310" - def formula(household, period, parameters): - income = parameters( + def formula(person, period, parameters): + maximun_return_amount = parameters( period ).gov.provinces.yt.benefits.employment_benefit - benefits_income = household("benefits_income", period) + employment_income = person("employment_income", period) - return min_(benefits_income, income) + return min_(employment_income, maximun_return_amount) From 9182b7dfa72553b8ab909d2f3e3f29052027cf28 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 12 Jun 2023 22:44:40 +0000 Subject: [PATCH 05/69] ca employment amount --- .../credits/yt_employment_amount/yt_employment_amount.yaml} | 0 .../yt_employment_amount}/yt_employment_amount.yaml | 6 +++--- .../yukon_employment_benefit/yt_employment_benefit.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename policyengine_canada/parameters/gov/provinces/yt/{benefits/employment_benefit.yaml => tax/income/credits/yt_employment_amount/yt_employment_amount.yaml} (100%) rename policyengine_canada/tests/gov/provinces/yt/tax/income/{benefits => credits/yt_employment_amount}/yt_employment_amount.yaml (79%) rename policyengine_canada/variables/gov/provinces/yt/{benefits => tax}/yukon_employment_benefit/yt_employment_benefit.py (83%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/yt/benefits/employment_benefit.yaml rename to policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml similarity index 79% rename from policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml rename to policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml index d178b0677..cf9408e59 100644 --- a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml @@ -4,7 +4,7 @@ province_code: YT employment_income: 30000 output: - yt_employment_benefit: 1_287 + yt_employment_amount: 1_287 - name: tax return for no income period: 2022 @@ -12,7 +12,7 @@ province_code: YT employment_income: 0 output: - yt_employment_benefit: 0 + yt_employment_amount: 0 - name: tax return for income under maximum amount period: 2022 @@ -20,5 +20,5 @@ province_code: YT employment_income: 1_000 output: - yt_employment_benefit: 1_000 + yt_employment_amount: 1_000 diff --git a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py similarity index 83% rename from policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py rename to policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py index fa8d34b93..09c995fb7 100644 --- a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_employment_benefit/yt_employment_benefit.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py @@ -1,7 +1,7 @@ from policyengine_canada.model_api import * -class yt_employment_benefit(Variable): +class yt_employment_amount(Variable): value_type = float entity = Person label = "Yukon Employment Amount" @@ -13,7 +13,7 @@ class yt_employment_benefit(Variable): def formula(person, period, parameters): maximun_return_amount = parameters( period - ).gov.provinces.yt.benefits.employment_benefit + ).gov.provinces.yt.tax.income.credits.yt_employment_amount.yt_employment_amount employment_income = person("employment_income", period) From c71e91379cfb4b9efd72ab9dd2f9aa71dac48b29 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:22:07 +0000 Subject: [PATCH 06/69] Created parameters --- .../amount/age/age_amount.yaml | 9 +++++++++ .../amount/age/net_income_limit/higher_threshold.yaml | 9 +++++++++ .../amount/age/net_income_limit/lower_threshold.yaml | 9 +++++++++ .../amount/basic_personal_amount.yaml | 10 ++++++++++ .../amount/caregiver/caregiver_amount.yaml | 9 +++++++++ .../caregiver/net_income_limit/higher_threshold.yaml | 9 +++++++++ .../caregiver/net_income_limit/lower_threshold.yaml | 9 +++++++++ .../amount/child_amount.yaml | 9 +++++++++ .../amount/dependant/dependant_amount.yaml | 9 +++++++++ .../dependant/net_income_limit/higher_threshold.yaml | 9 +++++++++ .../dependant/net_income_limit/lower_threshold.yaml | 9 +++++++++ .../amount/disability_amount.yaml | 9 +++++++++ .../infirm_dependant_age_eligibility.yaml | 9 +++++++++ .../infirm_dependant/infirm_dependant_amount.yaml | 9 +++++++++ .../net_income_limit/higher_threshold.yaml | 9 +++++++++ .../net_income_limit/lower_threshold.yaml | 9 +++++++++ .../amount/pension_income_amount.yaml | 9 +++++++++ .../amount/senior_supplementary_amount.yaml | 9 +++++++++ .../spouse/net_income_limit/higher_threshold.yaml | 9 +++++++++ .../spouse/net_income_limit/lower_threshold.yaml | 9 +++++++++ .../amount/spouse/spouse_amount.yaml | 9 +++++++++ 21 files changed, 190 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml new file mode 100644 index 000000000..1dda865b1 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person will be 65 or older on 2023-12-31 +values: + 2023-01-01: 5_380 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml new file mode 100644 index 000000000..e337f50fe --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Age Amount Higher Net Income Limit +values: + 2023-01-01: 75_918 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Higher Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml new file mode 100644 index 000000000..eaf6f496b --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Age Amount Lower Net Income Limit +values: + 2023-01-01: 40_051 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Lower Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml new file mode 100644 index 000000000..717293125 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml @@ -0,0 +1,10 @@ +description: Saskatchewan Personal Tax Credits Return Amount for every person employed in SK and every pensioner residing in SK +values: + 2023-01-01: 17_661 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Basic Personal Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml new file mode 100644 index 000000000..c3368e71d --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person who is taking care of a dependent. +values: + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml new file mode 100644 index 000000000..33fcbcb0d --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Caregiver Amount Higher Net Income Limit +values: + 2023-01-01: 28_175 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount Higher Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml new file mode 100644 index 000000000..54b944fc0 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Caregiver Amount Lower Net Income Limit +values: + 2023-01-01: 17_770 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount Lower Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml new file mode 100644 index 000000000..6c2372cfe --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for each child a person is supporting under the age of 18 +values: + 2023-01-01: 6_700 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Child Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml new file mode 100644 index 000000000..dfe3acb58 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person who is supporting an eligible dependant. +values: + 2023-01-01: 17_661 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml new file mode 100644 index 000000000..8292ada86 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Higher Net Income Limit +values: + 2023-01-01: 17_661 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Higher Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml new file mode 100644 index 000000000..ba89b5226 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Lower Net Income Limit +values: + 2023-01-01: 1_767 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Lower Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml new file mode 100644 index 000000000..119bd8fae --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person who will claim the disability amount on income tax and benefit return by using Form T2201, Disability Tax Credit Certificate. +values: + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Disability Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml new file mode 100644 index 000000000..999fab766 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person who is supporting an infirm dependent at or over this age. +values: + 2023-01-01: 18 +metadata: + unit: year + label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependents Age Eligibility + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml new file mode 100644 index 000000000..4d00f65c6 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for +values: + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependents age 18 or order + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml new file mode 100644 index 000000000..5cafd8b33 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Higher Net Income Limit +values: + 2023-01-01: 17_788 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Higher Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml new file mode 100644 index 000000000..6f9820725 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Lower Net Income Limit +values: + 2023-01-01: 7_383 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Lower Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml new file mode 100644 index 000000000..84053b39d --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person who will receive regular pension payments from a pension plan or fund. +values: + 2023-01-01: 1_000 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Pension Income Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml new file mode 100644 index 000000000..d5bfa2e00 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a SK resident who will be 65 or order on 2023-12-31. +values: + 2023-01-01: 1_421 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Senior Supplementary Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml new file mode 100644 index 000000000..7c9795d8c --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Higher Net Income Limit +values: + 2023-01-01: 17_661 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Higher Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml new file mode 100644 index 000000000..498b551e9 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Lower Net Income Limit +values: + 2023-01-01: 1_767 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Lower Net Income Limit + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml new file mode 100644 index 000000000..f82258c62 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan Personal Tax Credits Return Amount for a person is supporting spouse or common-law partner. +values: + 2023-01-01: 17_661 +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-Law Partner Amount + reference: + -title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html From 81b74cef6bf173e5592dee9b3efa27f6c3b23fe4 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Fri, 23 Jun 2023 18:00:58 +0000 Subject: [PATCH 07/69] Fixed variables and passed test --- .../credits_return/amount/age/age_amount.yaml | 10 ++++++ .../amount/age/age_eligibility.yaml | 10 ++++++ .../amount/age/net_income_base_amount.yaml | 10 ++++++ .../amount/age/net_income_maximum_amount.yaml | 10 ++++++ .../amount/age/reduction_rate.yaml | 12 +++++++ .../amount/age/age_amount.yaml | 9 ----- .../net_income_limit/higher_threshold.yaml | 9 ----- .../age/net_income_limit/lower_threshold.yaml | 9 ----- .../amount/basic_personal_amount.yaml | 10 ------ .../amount/caregiver/caregiver_amount.yaml | 9 ----- .../net_income_limit/higher_threshold.yaml | 9 ----- .../net_income_limit/lower_threshold.yaml | 9 ----- .../amount/child_amount.yaml | 9 ----- .../amount/dependant/dependant_amount.yaml | 9 ----- .../net_income_limit/higher_threshold.yaml | 9 ----- .../net_income_limit/lower_threshold.yaml | 9 ----- .../amount/disability_amount.yaml | 9 ----- .../infirm_dependant_age_eligibility.yaml | 9 ----- .../infirm_dependant_amount.yaml | 9 ----- .../net_income_limit/higher_threshold.yaml | 9 ----- .../net_income_limit/lower_threshold.yaml | 9 ----- .../amount/pension_income_amount.yaml | 9 ----- .../amount/senior_supplementary_amount.yaml | 9 ----- .../net_income_limit/higher_threshold.yaml | 9 ----- .../net_income_limit/lower_threshold.yaml | 9 ----- .../amount/spouse/spouse_amount.yaml | 9 ----- .../credits_return/amount/sk_age_amount.yaml | 35 +++++++++++++++++++ .../credits_return/amount/sk_age_amount.py | 24 +++++++++++++ 28 files changed, 111 insertions(+), 190 deletions(-) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml create mode 100644 policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml new file mode 100644 index 000000000..2d8dd02db --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml @@ -0,0 +1,10 @@ +description: Saskatchewan Personal Tax Credits Return Maximum Amount for a person who can get Age Amount +values: + 2023-01-01: 5_380 + +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Maximum Age Amount + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml new file mode 100644 index 000000000..7eecdff40 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml @@ -0,0 +1,10 @@ +description: Saskatchewan Personal Tax Credits Return provides Age Amount for a seniors at or above this age. +values: + 2023-01-01: 65 + +metadata: + unit: year + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Age Eligibility + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml new file mode 100644 index 000000000..6e05733fc --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml @@ -0,0 +1,10 @@ +description: Saskatchewan Personal Tax Credits Return Age Amount Base Net Income Amount +values: + 2023-01-01: 40_051 + +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Base Net Income Amount + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml new file mode 100644 index 000000000..15bbc713a --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml @@ -0,0 +1,10 @@ +description: Saskatchewan Personal Tax Credits Return Age Amount Maximum Net Income Amount +values: + 2023-01-01: 75_918 + +metadata: + unit: currency-CAD + label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Maximum Net Income Amount + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml new file mode 100644 index 000000000..fecbded50 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml @@ -0,0 +1,12 @@ +description: Saskatchewan Personal Tax Credit Return reduces the age amount tax credit at this rate. +values: + 2023-01-01: 0.15 + +metadata: + type: marginal_rate + threshold_unit: currency-CAD + rate_unit: /1 + label: Saskatchewan Personal Tax Credit Return Age Amount Reduction Rate. + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml deleted file mode 100644 index 1dda865b1..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/age_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person will be 65 or older on 2023-12-31 -values: - 2023-01-01: 5_380 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml deleted file mode 100644 index e337f50fe..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/higher_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Age Amount Higher Net Income Limit -values: - 2023-01-01: 75_918 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Higher Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml deleted file mode 100644 index eaf6f496b..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/age/net_income_limit/lower_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Age Amount Lower Net Income Limit -values: - 2023-01-01: 40_051 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Lower Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml deleted file mode 100644 index 717293125..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/basic_personal_amount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for every person employed in SK and every pensioner residing in SK -values: - 2023-01-01: 17_661 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Basic Personal Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html - diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml deleted file mode 100644 index c3368e71d..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/caregiver_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person who is taking care of a dependent. -values: - 2023-01-01: 10_405 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml deleted file mode 100644 index 33fcbcb0d..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/higher_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Caregiver Amount Higher Net Income Limit -values: - 2023-01-01: 28_175 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount Higher Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml deleted file mode 100644 index 54b944fc0..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/caregiver/net_income_limit/lower_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Caregiver Amount Lower Net Income Limit -values: - 2023-01-01: 17_770 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Caregiver Amount Lower Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml deleted file mode 100644 index 6c2372cfe..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/child_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for each child a person is supporting under the age of 18 -values: - 2023-01-01: 6_700 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Child Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml deleted file mode 100644 index dfe3acb58..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/dependant_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person who is supporting an eligible dependant. -values: - 2023-01-01: 17_661 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml deleted file mode 100644 index 8292ada86..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/higher_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Higher Net Income Limit -values: - 2023-01-01: 17_661 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Higher Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml deleted file mode 100644 index ba89b5226..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/dependant/net_income_limit/lower_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Lower Net Income Limit -values: - 2023-01-01: 1_767 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for an Eligible Dependant Lower Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml deleted file mode 100644 index 119bd8fae..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/disability_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person who will claim the disability amount on income tax and benefit return by using Form T2201, Disability Tax Credit Certificate. -values: - 2023-01-01: 10_405 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Disability Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml deleted file mode 100644 index 999fab766..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_age_eligibility.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person who is supporting an infirm dependent at or over this age. -values: - 2023-01-01: 18 -metadata: - unit: year - label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependents Age Eligibility - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml deleted file mode 100644 index 4d00f65c6..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/infirm_dependant_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for -values: - 2023-01-01: 10_405 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependents age 18 or order - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml deleted file mode 100644 index 5cafd8b33..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/higher_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Higher Net Income Limit -values: - 2023-01-01: 17_788 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Higher Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml deleted file mode 100644 index 6f9820725..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/infirm_dependant/net_income_limit/lower_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Lower Net Income Limit -values: - 2023-01-01: 7_383 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Amount for Infirm Dependants age 18 or older Lower Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml deleted file mode 100644 index 84053b39d..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/pension_income_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person who will receive regular pension payments from a pension plan or fund. -values: - 2023-01-01: 1_000 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Pension Income Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml deleted file mode 100644 index d5bfa2e00..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/senior_supplementary_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a SK resident who will be 65 or order on 2023-12-31. -values: - 2023-01-01: 1_421 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Senior Supplementary Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml deleted file mode 100644 index 7c9795d8c..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/higher_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Higher Net Income Limit -values: - 2023-01-01: 17_661 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Higher Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml deleted file mode 100644 index 498b551e9..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/net_income_limit/lower_threshold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Lower Net Income Limit -values: - 2023-01-01: 1_767 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-law Partner Amount Lower Net Income Limit - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml deleted file mode 100644 index f82258c62..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/sk_personal_tax_credits_return/amount/spouse/spouse_amount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Amount for a person is supporting spouse or common-law partner. -values: - 2023-01-01: 17_661 -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Spouse or Common-Law Partner Amount - reference: - -title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/td1-personal-tax-credits-returns/td1-forms-pay-received-on-january-1-later/td1sk.html diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml new file mode 100644 index 000000000..30a849e4a --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml @@ -0,0 +1,35 @@ +- name: Ineligible + period: 2023 + input: + province_code: SK + age: 64 + individual_net_income: 20_000 + output: + sk_age_amount: 0 + +- name: Eligible and net income below base amount + period: 2023 + input: + province_code: SK + age: 70 + individual_net_income: 40_000 + output: + sk_age_amount: 5_380 + +- name: Eligible and net income between base net income amount and maximum net income amount # 5_380 - ((60_000 - 40_051) * 0.15) + period: 2023 + input: + province_code: SK + age: 65 + individual_net_income: 60_000 + output: + sk_age_amount: 2387.65 + +- name: Eligible over maximum net income amount + period: 2023 + input: + province_code: SK + age: 68 + individual_net_income: 100_000 + output: + sk_age_amount: 0 \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py new file mode 100644 index 000000000..0de36922d --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py @@ -0,0 +1,24 @@ +from policyengine_canada.model_api import * + + +class sk_age_amount(Variable): + value_type = float + entity = Person + label = "Saskatchewan Personal Tax Credits Return Age Amount" + unit = CAD + definition_period = YEAR + reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf" + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.sk.tax.credits_return.amount.age + income = person("individual_net_income", period) + age = person("age", period) + eligible = age >= p.age_eligibility + reduction = (income > p.net_income_base_amount) * (income - p.net_income_base_amount) * p.reduction_rate + + return eligible * (income < p.net_income_maximum_amount) * (p.age_amount - reduction) + + #enter = age_amount - [(income - lower_threshold) * reduction_rate] + #enter = 5_380 - (income - 40_051) * 0.15 + From 9b8fc32d13de5ad800b067004a977845bc42f7d7 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Fri, 23 Jun 2023 18:15:38 +0000 Subject: [PATCH 08/69] Added changelog_entry --- changelog_entry.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..becb2559d 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Saskatchewan Personal Tax Credits Return Age Amount. \ No newline at end of file From 35b59bb3e26fcb2d3579585f6053f91866c574a8 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Fri, 23 Jun 2023 19:06:38 +0000 Subject: [PATCH 09/69] made format --- changelog_entry.yaml | 2 +- .../credits_return/amount/age/age_amount.yaml | 2 +- .../amount/age/age_eligibility.yaml | 2 +- .../amount/age/net_income_base_amount.yaml | 2 +- .../amount/age/net_income_maximum_amount.yaml | 2 +- .../amount/age/reduction_rate.yaml | 2 +- .../credits_return/amount/sk_age_amount.yaml | 2 +- .../credits_return/amount/sk_age_amount.py | 19 +++++++++++++------ 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index becb2559d..0cdae35f3 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Saskatchewan Personal Tax Credits Return Age Amount. \ No newline at end of file + - Saskatchewan Personal Tax Credits Return Age Amount. diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml index 2d8dd02db..ec12b6157 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml @@ -7,4 +7,4 @@ metadata: label: 2023 Saskatchewan Personal Tax Credits Return Maximum Age Amount reference: - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml index 7eecdff40..1819c52c1 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml @@ -7,4 +7,4 @@ metadata: label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Age Eligibility reference: - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml index 6e05733fc..486cc77c0 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml @@ -7,4 +7,4 @@ metadata: label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Base Net Income Amount reference: - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml index 15bbc713a..202919a8c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml @@ -7,4 +7,4 @@ metadata: label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Maximum Net Income Amount reference: - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml index fecbded50..7dd757af9 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml @@ -9,4 +9,4 @@ metadata: label: Saskatchewan Personal Tax Credit Return Age Amount Reduction Rate. reference: - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml index 30a849e4a..395e66ad0 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml @@ -32,4 +32,4 @@ age: 68 individual_net_income: 100_000 output: - sk_age_amount: 0 \ No newline at end of file + sk_age_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py index 0de36922d..207eb0464 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py @@ -15,10 +15,17 @@ def formula(person, period, parameters): income = person("individual_net_income", period) age = person("age", period) eligible = age >= p.age_eligibility - reduction = (income > p.net_income_base_amount) * (income - p.net_income_base_amount) * p.reduction_rate - - return eligible * (income < p.net_income_maximum_amount) * (p.age_amount - reduction) - - #enter = age_amount - [(income - lower_threshold) * reduction_rate] - #enter = 5_380 - (income - 40_051) * 0.15 + reduction = ( + (income > p.net_income_base_amount) + * (income - p.net_income_base_amount) + * p.reduction_rate + ) + return ( + eligible + * (income < p.net_income_maximum_amount) + * (p.age_amount - reduction) + ) + + # enter = age_amount - [(income - lower_threshold) * reduction_rate] + # enter = 5_380 - (income - 40_051) * 0.15 From 4bb2fa3d45a4af79eb8fcea96a72b66c244b4289 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 26 Jun 2023 20:17:55 +0000 Subject: [PATCH 10/69] Completed the parameter, variable, and tests coding part. 2 tests failed. --- .../age_threshold.yaml | 9 +++++++ .../sk_senior_supplementary/amount.yaml | 9 +++++++ .../sk_senior_supplementary_credit.yaml | 26 +++++++++++++++++++ .../sk_senior_supplementary_credit.py | 15 +++++++++++ 4 files changed, 59 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml create mode 100644 policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml new file mode 100644 index 000000000..5ab84fd3e --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan age-eligibility threshold for the senior supplementary tax credit. +values: + 2023-12-31: 65 +metadata: + unit: year + label: Saskatchewan senior supplementary tax credit eligible age-threshold + reference: + - title: Saskatchewan senior supplementary tax credit eligible age-threshold + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml new file mode 100644 index 000000000..b38d1b58c --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan provides this amount for residents will be 65 years or older on December 31, 2023. +values: + 2023-12-31: 1_421 +metadata: + unit: currency-CAD + label: Saskatchewan Senior Supplementary tax credits return amount + reference: + - title: Saskatchewan - Senior Supplementary Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml new file mode 100644 index 000000000..a97e172e7 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -0,0 +1,26 @@ +- name: SK senior supplementary tax credit - Under age threshold + period: 2024 + input: + province_code: SK + person: + age: 64 + output: + sk_senior_supplementary_credit: 0 + +- name: SK senior supplementary tax credit - At age threshold + period: 2024 + input: + province_code: SK + person: + age: 65 + output: + sk_senior_supplementary_credit: 1_421 + +- name: SK senior supplementary tax credit - Above age threshold + period: 2024 + input: + province_code: SK + person: + age: 66 + output: + sk_senior_supplementary_credit: 1_421 \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py new file mode 100644 index 000000000..79b42adf7 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -0,0 +1,15 @@ +from policyengine_canada.model_api import * + + +class sk_senior_supplementary_credit(Variable): + value_type = float + entity = Person + label = "Sasktachewan senior supplementary tax credit refund" + definition_period = YEAR + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.sk.tax.income.credits.sk_senior_supplementary + age = person("age", period) + amount = where(age >= p.age_threshold, p.amount, 0) + return amount \ No newline at end of file From f27560021a1530267c058f558f9835bb7e183c3d Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 26 Jun 2023 21:43:29 +0000 Subject: [PATCH 11/69] Finished. --- changelog_entry.yaml | 1 + .../sk_senior_supplementary/age_threshold.yaml | 2 +- .../credits/sk_senior_supplementary/amount.yaml | 2 +- .../credits/sa/qc_sa_married_both_eligible.yaml | 2 +- .../income/credits/sa/qc_sa_married_one_eligible.yaml | 2 +- .../sk_senior_supplementary_credit.yaml | 11 ++++------- .../sk_senior_supplementary_credit.py | 7 ++++--- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..8b1378917 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1 @@ + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index 5ab84fd3e..ce306473e 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -6,4 +6,4 @@ metadata: label: Saskatchewan senior supplementary tax credit eligible age-threshold reference: - title: Saskatchewan senior supplementary tax credit eligible age-threshold - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index b38d1b58c..9fe49dfce 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -6,4 +6,4 @@ metadata: label: Saskatchewan Senior Supplementary tax credits return amount reference: - title: Saskatchewan - Senior Supplementary Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml index fcfcb7cb6..8f78cb520 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml @@ -29,4 +29,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_both_eligible: 1 \ No newline at end of file + qc_sa_married_both_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml index 6ce860c0e..fd8414b26 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml @@ -28,4 +28,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_one_eligible: 1 \ No newline at end of file + qc_sa_married_one_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index a97e172e7..f6736ddd0 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -2,8 +2,7 @@ period: 2024 input: province_code: SK - person: - age: 64 + age: 64 output: sk_senior_supplementary_credit: 0 @@ -11,8 +10,7 @@ period: 2024 input: province_code: SK - person: - age: 65 + age: 65 output: sk_senior_supplementary_credit: 1_421 @@ -20,7 +18,6 @@ period: 2024 input: province_code: SK - person: - age: 66 + age: 66 output: - sk_senior_supplementary_credit: 1_421 \ No newline at end of file + sk_senior_supplementary_credit: 1_421 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index 79b42adf7..487de7d47 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -9,7 +9,8 @@ class sk_senior_supplementary_credit(Variable): defined_for = ProvinceCode.SK def formula(person, period, parameters): - p = parameters(period).gov.provinces.sk.tax.income.credits.sk_senior_supplementary + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary age = person("age", period) - amount = where(age >= p.age_threshold, p.amount, 0) - return amount \ No newline at end of file + return where(age >= p.age_threshold, p.amount, 0) From b6d6c8db0f969addaa503fd76a0c3e9f44f92260 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Tue, 27 Jun 2023 08:41:31 +0000 Subject: [PATCH 12/69] resolved conversations --- changelog_entry.yaml | 2 +- .../amount/age/net_income_maximum_amount.yaml | 10 ---------- .../credits_return/amount/age/reduction_rate.yaml | 12 ------------ .../credits/age_amount}/age_eligibility.yaml | 4 ++-- .../credits/age_amount/maximum_age_amount.yaml} | 4 ++-- .../credits/age_amount}/net_income_base_amount.yaml | 4 ++-- .../income/credits/age_amount/reduction_rate.yaml | 12 ++++++++++++ .../credits/sa/qc_sa_married_both_eligible.yaml | 2 +- .../credits/sa/qc_sa_married_one_eligible.yaml | 2 +- .../credits/age_amount}/sk_age_amount.yaml | 0 .../credits/age_amount}/sk_age_amount.py | 13 +++---------- 11 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml rename policyengine_canada/parameters/gov/provinces/sk/tax/{credits_return/amount/age => income/credits/age_amount}/age_eligibility.yaml (51%) rename policyengine_canada/parameters/gov/provinces/sk/tax/{credits_return/amount/age/age_amount.yaml => income/credits/age_amount/maximum_age_amount.yaml} (54%) rename policyengine_canada/parameters/gov/provinces/sk/tax/{credits_return/amount/age => income/credits/age_amount}/net_income_base_amount.yaml (55%) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml rename policyengine_canada/tests/gov/provinces/sk/tax/{credits_return/amount => income/credits/age_amount}/sk_age_amount.yaml (100%) rename policyengine_canada/variables/gov/provinces/sk/tax/{credits_return/amount => income/credits/age_amount}/sk_age_amount.py (61%) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 0cdae35f3..f4f5b0574 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Saskatchewan Personal Tax Credits Return Age Amount. + - Saskatchewan age amount tax credit. diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml deleted file mode 100644 index 202919a8c..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_maximum_amount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -description: Saskatchewan Personal Tax Credits Return Age Amount Maximum Net Income Amount -values: - 2023-01-01: 75_918 - -metadata: - unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Maximum Net Income Amount - reference: - - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml deleted file mode 100644 index 7dd757af9..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/reduction_rate.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Saskatchewan Personal Tax Credit Return reduces the age amount tax credit at this rate. -values: - 2023-01-01: 0.15 - -metadata: - type: marginal_rate - threshold_unit: currency-CAD - rate_unit: /1 - label: Saskatchewan Personal Tax Credit Return Age Amount Reduction Rate. - reference: - - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml similarity index 51% rename from policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index 1819c52c1..9641b57c4 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -1,10 +1,10 @@ -description: Saskatchewan Personal Tax Credits Return provides Age Amount for a seniors at or above this age. +description: Saskatchewan provides the age amount credit for filers at or above this age. values: 2023-01-01: 65 metadata: unit: year - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Age Eligibility + label: Saskatchewan age amount credit age eligibility reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml similarity index 54% rename from policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml index ec12b6157..ca433dd08 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/age_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml @@ -1,10 +1,10 @@ -description: Saskatchewan Personal Tax Credits Return Maximum Amount for a person who can get Age Amount +description: Saskatchewan provides the following maximum amount under the age amount credit. values: 2023-01-01: 5_380 metadata: unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Maximum Age Amount + label: 2023 Saskatchewan age amount credit max amount reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml similarity index 55% rename from policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml index 486cc77c0..0d5dc4422 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/credits_return/amount/age/net_income_base_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml @@ -1,10 +1,10 @@ -description: Saskatchewan Personal Tax Credits Return Age Amount Base Net Income Amount +description: Saskatchewan reduces the age amount credit above this income threshold. values: 2023-01-01: 40_051 metadata: unit: currency-CAD - label: 2023 Saskatchewan Personal Tax Credits Return Age Amount Base Net Income Amount + label: 2023 Saskatchewan age amount reduction threshold reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml new file mode 100644 index 000000000..f6bb5facf --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml @@ -0,0 +1,12 @@ +description: Saskatchewan reduces the age amount tax credit at this rate. +values: + 2023-01-01: 0.15 + +metadata: + unit: currency-CAD + period: year + rate_unit: /1 + label: Saskatchewan age amount reduction rate + reference: + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml index fcfcb7cb6..8f78cb520 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_both_eligible.yaml @@ -29,4 +29,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_both_eligible: 1 \ No newline at end of file + qc_sa_married_both_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml index 6ce860c0e..fd8414b26 100644 --- a/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/qc/tax/income/credits/sa/qc_sa_married_one_eligible.yaml @@ -28,4 +28,4 @@ members: [c1, c2] province_code: QC output: - qc_sa_married_one_eligible: 1 \ No newline at end of file + qc_sa_married_one_eligible: 1 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml similarity index 100% rename from policyengine_canada/tests/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.yaml rename to policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py similarity index 61% rename from policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py rename to policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 207eb0464..3a87c3b60 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/credits_return/amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -4,14 +4,14 @@ class sk_age_amount(Variable): value_type = float entity = Person - label = "Saskatchewan Personal Tax Credits Return Age Amount" + label = "Saskatchewan age amount credit" unit = CAD definition_period = YEAR reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf" defined_for = ProvinceCode.SK def formula(person, period, parameters): - p = parameters(period).gov.provinces.sk.tax.credits_return.amount.age + p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount income = person("individual_net_income", period) age = person("age", period) eligible = age >= p.age_eligibility @@ -21,11 +21,4 @@ def formula(person, period, parameters): * p.reduction_rate ) - return ( - eligible - * (income < p.net_income_maximum_amount) - * (p.age_amount - reduction) - ) - - # enter = age_amount - [(income - lower_threshold) * reduction_rate] - # enter = 5_380 - (income - 40_051) * 0.15 + return max_(0, eligible * (p.maximum_age_amount - reduction)) From 9eaf0239f83894d2666afdbe2c320ece25e13fbc Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 3 Jul 2023 19:08:34 +0000 Subject: [PATCH 13/69] Completed. --- changelog_entry.yaml | 1 + .../credits/sk_disability_amount/amount.yaml | 9 +++++++++ .../credits/pension/ab_pension_credit.yaml | 2 +- .../income/credits/sk_disability_amount.yaml | 17 +++++++++++++++++ .../is_disable_certificate.py | 9 +++++++++ .../sk_disability_amount.py | 16 ++++++++++++++++ 6 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml create mode 100644 policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..8b1378917 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1 @@ + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml new file mode 100644 index 000000000..b8f2624f9 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml @@ -0,0 +1,9 @@ +description: Saskatchewan provides this tax-credit amount for the disabled. +values: + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: Saskatchewan disability tax credit return + reference: + - title: Saskatchewan - disability tax credit + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml index e3c23fabd..a9faa8c92 100644 --- a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml @@ -20,4 +20,4 @@ pension_and_savings_plan_income: 0 province_code: AB output: - ab_pension_credit: 0 \ No newline at end of file + ab_pension_credit: 0 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml new file mode 100644 index 000000000..df3e677d4 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml @@ -0,0 +1,17 @@ +- name: Have Disability Tax Credit Certificate + period: 2024 + input: + province_code: SK + is_disable_certificate: True + + output: + sk_disability_amount: 10_405 + +- name: Do Not Have Disability Tax Credit Certificate + period: 2024 + input: + province_code: SK + is_disable_certificate: False + + output: + sk_disability_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py new file mode 100644 index 000000000..6ed956bc8 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py @@ -0,0 +1,9 @@ +from policyengine_canada.model_api import * + + +class is_disable_certificate(Variable): + value_type = bool + entity = Person + label = "have disability tax credit certificate" + definition_period = YEAR + defined_for = ProvinceCode.SK diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py new file mode 100644 index 000000000..0582bb999 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py @@ -0,0 +1,16 @@ +from policyengine_canada.model_api import * + + +class sk_disability_amount(Variable): + value_type = float + entity = Person + label = "SK Disability Amount Tax Credit" + definition_period = YEAR + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_disability_amount + eligibility = person("is_disable_certificate", period) + return where(eligibility == 1, p.amount, 0) From bff9ffa05215c10941323a51aab8f9a33ae1ae89 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 3 Jul 2023 23:03:48 +0000 Subject: [PATCH 14/69] Change codes according to recommendation. --- changelog_entry.yaml | 5 ++++- .../credits/sk_senior_supplementary/age_threshold.yaml | 4 ++-- .../tax/income/credits/sk_senior_supplementary/amount.yaml | 4 ++-- .../sk_senior_supplementary_credit.py | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 8b1378917..c04a1cc1d 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1 +1,4 @@ - +- bump: minor + changes: + added: + - Saskatchewan Senior Supplementary amount Tax Credit. diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index ce306473e..ab827b50f 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -1,6 +1,6 @@ -description: Saskatchewan age-eligibility threshold for the senior supplementary tax credit. +description: Saskatchewan provides the senior supplementary tax credit for filers of or above this age threshold. values: - 2023-12-31: 65 + 2023-01-01: 65 metadata: unit: year label: Saskatchewan senior supplementary tax credit eligible age-threshold diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 9fe49dfce..905b2ed79 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,6 +1,6 @@ -description: Saskatchewan provides this amount for residents will be 65 years or older on December 31, 2023. +description: Saskatchewan provides this amount under the senior supplement credit. values: - 2023-12-31: 1_421 + 2023-01-01: 1_421 metadata: unit: currency-CAD label: Saskatchewan Senior Supplementary tax credits return amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index 487de7d47..52c38dc25 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -4,7 +4,7 @@ class sk_senior_supplementary_credit(Variable): value_type = float entity = Person - label = "Sasktachewan senior supplementary tax credit refund" + label = "Sasktachewan senior supplementary tax credit" definition_period = YEAR defined_for = ProvinceCode.SK From 263a244a9d7c752d497e450e9e62c58548cefc55 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 3 Jul 2023 23:35:51 +0000 Subject: [PATCH 15/69] add changelog --- changelog_entry.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 8b1378917..6c9098b89 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1 +1,4 @@ - +- bump: minor + changes: + added: + - Sk Disability amount tax credit. From 055443f19780efccbbe57b829ca3d0cf5766592e Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Wed, 5 Jul 2023 20:32:39 +0000 Subject: [PATCH 16/69] Fixes #353 --- .../sk/tax/income/credits/age_amount/age_eligibility.yaml | 2 ++ .../sk/tax/income/credits/age_amount/maximum_age_amount.yaml | 2 ++ .../tax/income/credits/age_amount/net_income_base_amount.yaml | 2 ++ .../sk/tax/income/credits/age_amount/reduction_rate.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index 9641b57c4..d739d7fd4 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -8,3 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml index ca433dd08..b1c669a88 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml @@ -8,3 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml index 0d5dc4422..84ea06644 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml @@ -8,3 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml index f6bb5facf..5bb433428 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml @@ -10,3 +10,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf + title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download From 6c99ffaf56e32497e1780751bfa7da03965f6a77 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:05:51 +0000 Subject: [PATCH 17/69] Fixes #353 --- .../sk/tax/income/credits/age_amount/reduction_rate.yaml | 2 +- .../ab/tax/income/credits/pension/ab_pension_credit.yaml | 2 +- .../sk/tax/income/credits/age_amount/sk_age_amount.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml index 5bb433428..82a67a6cf 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml @@ -10,5 +10,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml index e3c23fabd..a9faa8c92 100644 --- a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml @@ -20,4 +20,4 @@ pension_and_savings_plan_income: 0 province_code: AB output: - ab_pension_credit: 0 \ No newline at end of file + ab_pension_credit: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 3a87c3b60..8ec4028d4 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -20,5 +20,6 @@ def formula(person, period, parameters): * (income - p.net_income_base_amount) * p.reduction_rate ) + reduced_amount = p.maximum_age_amount - reduction - return max_(0, eligible * (p.maximum_age_amount - reduction)) + return max_(0, eligible * reduced_amount) From 590d4dd2051efc6e7c35121737f1c524c2fd0e53 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:42:07 +0000 Subject: [PATCH 18/69] Fixes #353 --- .../sk/tax/income/credits/age_amount/age_eligibility.yaml | 2 +- .../sk/tax/income/credits/age_amount/maximum_age_amount.yaml | 2 +- .../tax/income/credits/age_amount/net_income_base_amount.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index d739d7fd4..d4a670dbe 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -8,5 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml index b1c669a88..7bf123df7 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml @@ -8,5 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml index 84ea06644..4d684bd5d 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml @@ -8,5 +8,5 @@ metadata: reference: - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download From a6a51fb3b2735c68cfcb46b094172a9342668c21 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Mon, 31 Jul 2023 03:52:29 +0000 Subject: [PATCH 19/69] Resolved comments --- ...maximum_age_amount.yaml => max_amount.yaml} | 0 .../income_threshold.yaml} | 0 .../rate.yaml} | 18 +++++++++++++----- .../income/credits/age_amount/sk_age_amount.py | 10 +++++----- 4 files changed, 18 insertions(+), 10 deletions(-) rename policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/{maximum_age_amount.yaml => max_amount.yaml} (100%) rename policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/{net_income_base_amount.yaml => reduction/income_threshold.yaml} (100%) rename policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/{reduction_rate.yaml => reduction/rate.yaml} (66%) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/maximum_age_amount.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/net_income_base_amount.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml similarity index 66% rename from policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml rename to policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index 82a67a6cf..bf494243c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -1,10 +1,8 @@ -description: Saskatchewan reduces the age amount tax credit at this rate. -values: - 2023-01-01: 0.15 +description: Saskatchewan reduces the age amount tax credit at this rate based on income. metadata: - unit: currency-CAD - period: year + type: marginal_rate + threshold_unit: currency-CAD rate_unit: /1 label: Saskatchewan age amount reduction rate reference: @@ -12,3 +10,13 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download + +brackets: + - threshold: + 2023-01-01: 0 + rate: + 2023-01-01: 0 + - threshold: + 2023-01-01: 40_051 + rate: + 2023-01-01: 0.15 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 8ec4028d4..30dcc29fc 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -16,10 +16,10 @@ def formula(person, period, parameters): age = person("age", period) eligible = age >= p.age_eligibility reduction = ( - (income > p.net_income_base_amount) - * (income - p.net_income_base_amount) - * p.reduction_rate + (income > p.reduction.income_threshold) + * (income - p.reduction.income_threshold) + * p.reduction.rate ) - reduced_amount = p.maximum_age_amount - reduction + reduced_amount = max_(p.max_amount - reduction, 0) - return max_(0, eligible * reduced_amount) + return eligible * reduced_amount From 8482d5767d2ecb37167ec748579917b728bc1cb1 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:02:19 +0000 Subject: [PATCH 20/69] Fix parameter's reference and label name according to comments --- .../sk_senior_supplementary/age_threshold.yaml | 7 ++++++- .../credits/sk_senior_supplementary/amount.yaml | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index ab827b50f..ecc762677 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -5,5 +5,10 @@ metadata: unit: year label: Saskatchewan senior supplementary tax credit eligible age-threshold reference: - - title: Saskatchewan senior supplementary tax credit eligible age-threshold + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf + - title: Saskatchewan I2-01 The Income Tax Act, 2000 + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 905b2ed79..61bff0600 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,9 +1,14 @@ -description: Saskatchewan provides this amount under the senior supplement credit. +description: Saskatchewan provides this amount under the senior supplement credit. values: 2023-01-01: 1_421 metadata: unit: currency-CAD - label: Saskatchewan Senior Supplementary tax credits return amount + label: Saskatchewan Senior Supplementary tax credit amount reference: - - title: Saskatchewan - Senior Supplementary Tax Credits Return + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf + - title: Saskatchewan I2-01 The Income Tax Act, 2000 + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + From 7594544142aab7b59a697ccf76f338c3e825ec7a Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:23:05 +0000 Subject: [PATCH 21/69] make versions right --- .../ab/tax/income/credits/pension/ab_pension_credit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml index e3c23fabd..a9faa8c92 100644 --- a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml @@ -20,4 +20,4 @@ pension_and_savings_plan_income: 0 province_code: AB output: - ab_pension_credit: 0 \ No newline at end of file + ab_pension_credit: 0 From e74a6f646a0ee6baa81888cddbcdcc3643126fa1 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:27:49 +0000 Subject: [PATCH 22/69] Commit to make version right. --- .../sk_senior_supplementary/sk_senior_supplementary_credit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index f6736ddd0..625b74f4c 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -18,6 +18,6 @@ period: 2024 input: province_code: SK - age: 66 + age: 68 output: sk_senior_supplementary_credit: 1_421 From 8dab3c8d4f84aaddd45ce9822b2cb771acfce380 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:46:08 +0000 Subject: [PATCH 23/69] Fix references in parameters. --- .../tax/income/credits/sk_disability_amount/amount.yaml | 8 ++++++-- .../credits/sk_disability_amount/sk_disability_amount.py | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml index b8f2624f9..3b0c5d9be 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml @@ -3,7 +3,11 @@ values: 2023-01-01: 10_405 metadata: unit: currency-CAD - label: Saskatchewan disability tax credit return + label: Saskatchewan disability tax credit amount reference: - - title: Saskatchewan - disability tax credit + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf + - title: Saskatchewan I2-01 The Income Tax Act, 2000 + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py index 0582bb999..db96b6916 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py @@ -9,8 +9,6 @@ class sk_disability_amount(Variable): defined_for = ProvinceCode.SK def formula(person, period, parameters): - p = parameters( - period - ).gov.provinces.sk.tax.income.credits.sk_disability_amount + p = parameters(period).gov.provinces.sk.tax.income.credits.sk_disability_amount eligibility = person("is_disable_certificate", period) return where(eligibility == 1, p.amount, 0) From 29c4616e925a767ffe90ffcbc86145d334817b21 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:52:41 +0000 Subject: [PATCH 24/69] Make some changes to create new pull request --- .../sk/tax/income/credits/sk_disability_amount/amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml index 3b0c5d9be..57ab25106 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides this tax-credit amount for the disabled. +description: Saskatchewan provides this tax-credit amount for the qualified disabled. values: 2023-01-01: 10_405 metadata: From 9797b915d852095f7a673df70de41220685f8626 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:58:48 +0000 Subject: [PATCH 25/69] merge branch --- .../credits/sk_disability_amount/sk_disability_amount.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py index db96b6916..0582bb999 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py @@ -9,6 +9,8 @@ class sk_disability_amount(Variable): defined_for = ProvinceCode.SK def formula(person, period, parameters): - p = parameters(period).gov.provinces.sk.tax.income.credits.sk_disability_amount + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_disability_amount eligibility = person("is_disable_certificate", period) return where(eligibility == 1, p.amount, 0) From 642483acb8889a3b2bb3317aa4f576b60a8db2ff Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 31 Jul 2023 20:40:55 +0000 Subject: [PATCH 26/69] modified --- .../credits/yt_employment_amount/yt_employment_amount.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml index 37d11e455..564739c53 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml @@ -1,9 +1,9 @@ -description: Yukon provides this employment amount. +description: Yukon provides this employment benefit amount. values: 2022-01-01: 1_287 metadata: unit: currency-CAD - label: Yukon Employment Amount + label: Yukon employment benefit amount reference: - title: Canada Employment Amount Benefit for Yukon - href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 + href: https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf \ No newline at end of file From d6aefbc3296695af32192a5fb5996a2bf449e4f0 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 31 Jul 2023 21:04:41 +0000 Subject: [PATCH 27/69] modified --- .../yt_employment_amount/yt_employment_amount.yaml | 0 .../yt_employment_amount/yt_employment_amount.yaml | 4 ++-- .../yukon_employment_benefit/yt_employment_benefit.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename policyengine_canada/parameters/gov/provinces/yt/{tax/income/credits => benefits}/yt_employment_amount/yt_employment_amount.yaml (100%) rename policyengine_canada/tests/gov/provinces/yt/tax/income/{credits => benefits}/yt_employment_amount/yt_employment_amount.yaml (81%) rename policyengine_canada/variables/gov/provinces/yt/tax/{ => income/benefits}/yukon_employment_benefit/yt_employment_benefit.py (94%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml rename to policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml similarity index 81% rename from policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml rename to policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml index cf9408e59..fe5f37af5 100644 --- a/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_employment_amount/yt_employment_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml @@ -6,7 +6,7 @@ output: yt_employment_amount: 1_287 -- name: tax return for no income +- name: tax return with no income period: 2022 input: province_code: YT @@ -14,7 +14,7 @@ output: yt_employment_amount: 0 -- name: tax return for income under maximum amount +- name: tax return with income under maximum amount period: 2022 input: province_code: YT diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py similarity index 94% rename from policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py rename to policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py index 09c995fb7..ad7bb085e 100644 --- a/policyengine_canada/variables/gov/provinces/yt/tax/yukon_employment_benefit/yt_employment_benefit.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py @@ -4,7 +4,7 @@ class yt_employment_amount(Variable): value_type = float entity = Person - label = "Yukon Employment Amount" + label = "Yukon Employment Benefit Amount" unit = CAD definition_period = YEAR defined_for = ProvinceCode.YT From c15a04b1838144f4e1051ab8aea2198497d1cd35 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Tue, 1 Aug 2023 02:53:06 +0000 Subject: [PATCH 28/69] Resolved conversations. --- .../age_amount/reduction/income_threshold.yaml | 12 ------------ .../tax/income/credits/age_amount/sk_age_amount.py | 6 +----- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml deleted file mode 100644 index 4d684bd5d..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/income_threshold.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Saskatchewan reduces the age amount credit above this income threshold. -values: - 2023-01-01: 40_051 - -metadata: - unit: currency-CAD - label: 2023 Saskatchewan age amount reduction threshold - reference: - - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit - href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 30dcc29fc..e54a71a69 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -15,11 +15,7 @@ def formula(person, period, parameters): income = person("individual_net_income", period) age = person("age", period) eligible = age >= p.age_eligibility - reduction = ( - (income > p.reduction.income_threshold) - * (income - p.reduction.income_threshold) - * p.reduction.rate - ) + reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) return eligible * reduced_amount From 4ad5610b58af714f51b08e79abcda59e24dbbe00 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 2 Aug 2023 15:56:54 +0000 Subject: [PATCH 29/69] modified --- .../benefits/yt_employment_amount/yt_employment_amount.yaml | 4 +++- .../yt_employment_amount.py} | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) rename policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/{yukon_employment_benefit/yt_employment_benefit.py => yukon_employment_amount/yt_employment_amount.py} (74%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml index 564739c53..76a2ee74d 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml @@ -5,5 +5,7 @@ metadata: unit: currency-CAD label: Yukon employment benefit amount reference: + - title: Canada Employment Amount Benefit for Yukon -Page 33 + href: https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf - title: Canada Employment Amount Benefit for Yukon - href: https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf \ No newline at end of file + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py similarity index 74% rename from policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py rename to policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py index ad7bb085e..0511f76d7 100644 --- a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_benefit/yt_employment_benefit.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py @@ -11,10 +11,10 @@ class yt_employment_amount(Variable): reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310" def formula(person, period, parameters): - maximun_return_amount = parameters( + max_amount = parameters( period - ).gov.provinces.yt.tax.income.credits.yt_employment_amount.yt_employment_amount + ).gov.provinces.yt.benefits.yt_employment_amount.yt_employment_amount employment_income = person("employment_income", period) - return min_(employment_income, maximun_return_amount) + return min_(employment_income, max_amount) From d2ef9c82cbef351fef103e0cb3d66ed412b98846 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:38:23 +0000 Subject: [PATCH 30/69] Add 2022 values and reference --- .../credits/age_amount/age_eligibility.yaml | 3 ++ .../income/credits/age_amount/max_amount.yaml | 3 ++ .../credits/age_amount/reduction/rate.yaml | 10 ++++- .../credits/age_amount/sk_age_amount.yaml | 37 +++++++++++++++++++ .../credits/age_amount/sk_age_amount.py | 8 +++- 5 files changed, 58 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index d4a670dbe..81e6122c2 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -1,11 +1,14 @@ description: Saskatchewan provides the age amount credit for filers at or above this age. values: + 2022-01-01: 65 2023-01-01: 65 metadata: unit: year label: Saskatchewan age amount credit age eligibility reference: + - title: 2022 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml index 7bf123df7..b0df6bb14 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml @@ -1,11 +1,14 @@ description: Saskatchewan provides the following maximum amount under the age amount credit. values: + 2022-01-01: 5_061 2023-01-01: 5_380 metadata: unit: currency-CAD label: 2023 Saskatchewan age amount credit max amount reference: + - title: 2022 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index bf494243c..4559e71aa 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -6,16 +6,22 @@ metadata: rate_unit: /1 label: Saskatchewan age amount reduction rate reference: + - title: 2022 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + - title: Worksheet for the 2022 Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: Worksheet for the 2023 Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download brackets: - threshold: - 2023-01-01: 0 + 2022-01-01: 37_677 rate: - 2023-01-01: 0 + 2022-01-01: 0.15 - threshold: 2023-01-01: 40_051 rate: diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml index 395e66ad0..a4a650f43 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -1,3 +1,40 @@ +- name: Ineligible + period: 2022 + input: + province_code: SK + age: 64 + individual_net_income: 20_000 + output: + sk_age_amount: 0 + +- name: Eligible and net income below base amount + period: 2022 + input: + province_code: SK + age: 70 + individual_net_income: 35_000 + output: + sk_age_amount: 5_061 + +- name: Eligible and net income between base net income amount and maximum net income amount # 5_061 - ((60_000 - 37_677) * 0.15) + period: 2022 + input: + province_code: SK + age: 65 + individual_net_income: 60_000 + output: + sk_age_amount: 1_712.55 + +- name: Eligible over maximum net income amount + period: 2022 + input: + province_code: SK + age: 68 + individual_net_income: 100_000 + output: + sk_age_amount: 0 + + - name: Ineligible period: 2023 input: diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index e54a71a69..7f8a1a254 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -7,7 +7,13 @@ class sk_age_amount(Variable): label = "Saskatchewan age amount credit" unit = CAD definition_period = YEAR - reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf" + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf", + "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download", + ) defined_for = ProvinceCode.SK def formula(person, period, parameters): From 7f6bec8612dd73d4ed2c9dff58178f197f50fa04 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:55:27 +0000 Subject: [PATCH 31/69] Add parameters for 2022 policy and also add additional test scenarios for 2022. --- .../sk_senior_supplementary/age_threshold.yaml | 3 +++ .../credits/sk_senior_supplementary/amount.yaml | 4 +++- .../sk_senior_supplementary_credit.yaml | 14 +++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index ecc762677..2facd5f8c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -1,5 +1,6 @@ description: Saskatchewan provides the senior supplementary tax credit for filers of or above this age threshold. values: + 2022-01-01: 65 2023-01-01: 65 metadata: unit: year @@ -11,4 +12,6 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - title: Saskatchewan I2-01 The Income Tax Act, 2000 href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 61bff0600..f3a5c653c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,5 +1,6 @@ description: Saskatchewan provides this amount under the senior supplement credit. values: + 2022-01-01: 1_336 2023-01-01: 1_421 metadata: unit: currency-CAD @@ -11,4 +12,5 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - title: Saskatchewan I2-01 The Income Tax Act, 2000 href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf \ No newline at end of file diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index 625b74f4c..8f935178b 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -1,4 +1,4 @@ -- name: SK senior supplementary tax credit - Under age threshold +- name: 2023 SK senior supplementary tax credit - Under age threshold period: 2024 input: province_code: SK @@ -6,7 +6,7 @@ output: sk_senior_supplementary_credit: 0 -- name: SK senior supplementary tax credit - At age threshold +- name: 2023 SK senior supplementary tax credit - At age threshold period: 2024 input: province_code: SK @@ -14,10 +14,18 @@ output: sk_senior_supplementary_credit: 1_421 -- name: SK senior supplementary tax credit - Above age threshold +- name: 2023 SK senior supplementary tax credit - Above age threshold period: 2024 input: province_code: SK age: 68 output: sk_senior_supplementary_credit: 1_421 + +- name: 2022 SK senior supplementary tax credit - Above age threshold + period: 2022 + input: + province_code: SK + age: 68 + output: + sk_senior_supplementary_credit: 1_336 From a5c1e62f5200cc6faeb68439d279d4d8911016a2 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:43:41 +0000 Subject: [PATCH 32/69] Fixed tests. Co-authored-by: Pavel Makarchuk Co-authored-by: Yaohhhh --- .../credits/age_amount/age_eligibility.yaml | 1 - .../income/credits/age_amount/max_amount.yaml | 2 +- .../credits/age_amount/reduction/rate.yaml | 15 +++++------- .../credits/age_amount/sk_age_amount.yaml | 24 ++++++++++++++++--- .../credits/age_amount/sk_age_amount.py | 5 ++-- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index 81e6122c2..c0d8cb010 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -1,7 +1,6 @@ description: Saskatchewan provides the age amount credit for filers at or above this age. values: 2022-01-01: 65 - 2023-01-01: 65 metadata: unit: year diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml index b0df6bb14..7e13e38e4 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml @@ -5,7 +5,7 @@ values: metadata: unit: currency-CAD - label: 2023 Saskatchewan age amount credit max amount + label: Saskatchewan age amount credit max amount reference: - title: 2022 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index 4559e71aa..ea06a64bc 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan reduces the age amount tax credit at this rate based on income. +description: Saskatchewan reduces the age amount tax credit at this rate based on the income. metadata: type: marginal_rate @@ -6,23 +6,20 @@ metadata: rate_unit: /1 label: Saskatchewan age amount reduction rate reference: - - title: 2022 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf - title: Worksheet for the 2022 Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf - - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: Worksheet for the 2023 Personal Tax Credit Return + - title: Worksheet for the 2023 Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download brackets: - threshold: - 2022-01-01: 37_677 + 2022-01-01: 0 rate: - 2022-01-01: 0.15 + 2022-01-01: 0 - threshold: + 2022-01-01: 37_677 2023-01-01: 40_051 rate: - 2023-01-01: 0.15 + 2022-01-01: 0.15 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml index a4a650f43..4f9b7d99e 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -4,6 +4,7 @@ province_code: SK age: 64 individual_net_income: 20_000 + is_head: false output: sk_age_amount: 0 @@ -13,6 +14,7 @@ province_code: SK age: 70 individual_net_income: 35_000 + is_head: true output: sk_age_amount: 5_061 @@ -22,6 +24,7 @@ province_code: SK age: 65 individual_net_income: 60_000 + is_head: true output: sk_age_amount: 1_712.55 @@ -31,6 +34,7 @@ province_code: SK age: 68 individual_net_income: 100_000 + is_head: true output: sk_age_amount: 0 @@ -41,6 +45,7 @@ province_code: SK age: 64 individual_net_income: 20_000 + is_head: true output: sk_age_amount: 0 @@ -48,8 +53,9 @@ period: 2023 input: province_code: SK - age: 70 + age: 65 individual_net_income: 40_000 + is_head: true output: sk_age_amount: 5_380 @@ -59,14 +65,26 @@ province_code: SK age: 65 individual_net_income: 60_000 + is_head: true + output: + sk_age_amount: 2_387.65 + +- name: Not head - ineligible + period: 2023 + input: + province_code: SK + age: 65 + individual_net_income: 60_000 + is_head: false output: - sk_age_amount: 2387.65 + sk_age_amount: 0 - name: Eligible over maximum net income amount period: 2023 input: province_code: SK - age: 68 + age: 65 individual_net_income: 100_000 + is_head: true output: sk_age_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 7f8a1a254..bc132fd63 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -20,8 +20,9 @@ def formula(person, period, parameters): p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount income = person("individual_net_income", period) age = person("age", period) - eligible = age >= p.age_eligibility + age_eligible = age >= p.age_eligibility reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - + is_head = person("is_head", period) + eligible = is_head & age_eligible return eligible * reduced_amount From 6060d0ebfe72bd3039d682e99adf27c02f4e10ae Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:45:44 +0000 Subject: [PATCH 33/69] Fixed Saskatchewan Age Amount #353 --- .../sk/tax/income/credits/age_amount/age_eligibility.yaml | 2 +- .../sk/tax/income/credits/age_amount/reduction/rate.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index c0d8cb010..43daa226c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides the age amount credit for filers at or above this age. +description: Saskatchewan provides the age amount credit for filers at or above this age threshold. values: 2022-01-01: 65 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index ea06a64bc..a7d84bbd7 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -4,7 +4,7 @@ metadata: type: marginal_rate threshold_unit: currency-CAD rate_unit: /1 - label: Saskatchewan age amount reduction rate + label: Saskatchewan age amount credit reduction rate reference: - title: Worksheet for the 2022 Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf From 29541165063cc67569be8970448f8868ff17d6bd Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:49:42 +0000 Subject: [PATCH 34/69] Finish --- .../sk/tax/income/credits/sk_senior_supplementary/amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index f3a5c653c..0d70f4b83 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -13,4 +13,4 @@ metadata: - title: Saskatchewan I2-01 The Income Tax Act, 2000 href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf From 88f0511659e8ec68790093d078940c57887c7276 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:03:33 +0000 Subject: [PATCH 35/69] Fix and complete. --- changelog_entry.yaml | 2 +- .../credits/disability_amount/amount.yaml | 15 ++++++++++ .../credits/sk_disability_amount/amount.yaml | 13 -------- .../income/credits/sk_disability_amount.yaml | 30 +++++++++++++++---- .../disability_amount/sk_disability_amount.py | 19 ++++++++++++ .../is_disable_certificate.py | 9 ------ .../sk_disability_amount.py | 16 ---------- 7 files changed, 59 insertions(+), 45 deletions(-) create mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml delete mode 100644 policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py delete mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py delete mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 6c9098b89..d445c5644 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Sk Disability amount tax credit. + - Saskatchewan disability amount. diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml new file mode 100644 index 000000000..af7e43602 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -0,0 +1,15 @@ +description: Saskatchewan provides this amount for qualified disabled filers under the saskatchewan disability amount. +values: + 2022-01-01: 9_789 + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: Saskatchewan disability amount + reference: + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Page 25, Mental or physical impairment credit (23), (1) + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml deleted file mode 100644 index 57ab25106..000000000 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_disability_amount/amount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: Saskatchewan provides this tax-credit amount for the qualified disabled. -values: - 2023-01-01: 10_405 -metadata: - unit: currency-CAD - label: Saskatchewan disability tax credit amount - reference: - - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - - title: Saskatchewan I2-01 The Income Tax Act, 2000 - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml index df3e677d4..d1e59a83e 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml @@ -1,17 +1,35 @@ -- name: Have Disability Tax Credit Certificate - period: 2024 +- name: Head and disabled + period: 2023 input: province_code: SK - is_disable_certificate: True - + is_head: true + is_disabled: true output: sk_disability_amount: 10_405 -- name: Do Not Have Disability Tax Credit Certificate +- name: Head, not disabled period: 2024 input: province_code: SK - is_disable_certificate: False + is_head: true + is_disabled: false + output: + sk_disability_amount: 0 +- name: Head and disabled 2022 + period: 2022 + input: + province_code: SK + is_head: true + is_disabled: true + output: + sk_disability_amount: 9_789 + +- name: Disabled, not head + period: 2024 + input: + province_code: SK + is_head: false + is_disabled: true output: sk_disability_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py new file mode 100644 index 000000000..7b4a3c830 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py @@ -0,0 +1,19 @@ +from policyengine_canada.model_api import * + + +class sk_disability_amount(Variable): + value_type = float + entity = Person + unit: CAD + label = "Saskatchewan Disability Amount Tax Credit" + definition_period = YEAR + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.disability_amount + disabled = person("is_disabled", period) + is_head = person("is_head", period) + eligbile = is_head & disabled + return where(eligbile, p.amount, 0) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py deleted file mode 100644 index 6ed956bc8..000000000 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/is_disable_certificate.py +++ /dev/null @@ -1,9 +0,0 @@ -from policyengine_canada.model_api import * - - -class is_disable_certificate(Variable): - value_type = bool - entity = Person - label = "have disability tax credit certificate" - definition_period = YEAR - defined_for = ProvinceCode.SK diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py deleted file mode 100644 index 0582bb999..000000000 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_disability_amount/sk_disability_amount.py +++ /dev/null @@ -1,16 +0,0 @@ -from policyengine_canada.model_api import * - - -class sk_disability_amount(Variable): - value_type = float - entity = Person - label = "SK Disability Amount Tax Credit" - definition_period = YEAR - defined_for = ProvinceCode.SK - - def formula(person, period, parameters): - p = parameters( - period - ).gov.provinces.sk.tax.income.credits.sk_disability_amount - eligibility = person("is_disable_certificate", period) - return where(eligibility == 1, p.amount, 0) From 06c86e3ca244ed5894a22a79fc64d3ae2977a9cf Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:04:46 +0000 Subject: [PATCH 36/69] Fixed reference --- .../sk/tax/income/credits/age_amount/age_eligibility.yaml | 2 +- .../provinces/sk/tax/income/credits/age_amount/max_amount.yaml | 2 +- .../sk/tax/income/credits/age_amount/reduction/rate.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index 43daa226c..867e2ce7e 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -10,5 +10,5 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml index 7e13e38e4..ddc0d38d3 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml @@ -11,5 +11,5 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf - title: 2023 Saskatchewan Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index a7d84bbd7..3ca6e71c5 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -10,7 +10,7 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf - title: Worksheet for the 2023 Personal Tax Credit Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17 Age Credit + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download brackets: From 26ac071c8ed9241cfaf76ab6267cdb6ee42cd498 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:07:13 +0000 Subject: [PATCH 37/69] Make little changes --- .../sk/tax/income/credits/disability_amount/amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml index af7e43602..4e16eee56 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides this amount for qualified disabled filers under the saskatchewan disability amount. +description: Saskatchewan provides this amount for qualified disabled filers under the disability amount. values: 2022-01-01: 9_789 2023-01-01: 10_405 From c426b7414829d808d9a8e4e08e6dce2d40c3e5a7 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:07:34 +0000 Subject: [PATCH 38/69] Resolve the comments. --- .../credits/age_amount/age_eligibility.yaml | 12 ++-- .../income/credits/age_amount/max_amount.yaml | 13 ++-- .../credits/age_amount/reduction/rate.yaml | 17 ++--- .../credits/age_amount/sk_age_amount.yaml | 63 +++++++++++++------ .../credits/age_amount/sk_age_amount.py | 3 +- 5 files changed, 71 insertions(+), 37 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml index 867e2ce7e..ad6a6dd01 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -1,14 +1,16 @@ description: Saskatchewan provides the age amount credit for filers at or above this age threshold. values: - 2022-01-01: 65 + 2021-01-01: 65 metadata: unit: year label: Saskatchewan age amount credit age eligibility reference: + - title: 2021 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1 - title: 2022 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) - href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml index ddc0d38d3..e83521a43 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml @@ -1,5 +1,6 @@ -description: Saskatchewan provides the following maximum amount under the age amount credit. +description: Saskatchewan provides this maximum age amount credit. values: + 2021-01-01: 4_942 2022-01-01: 5_061 2023-01-01: 5_380 @@ -7,9 +8,11 @@ metadata: unit: currency-CAD label: Saskatchewan age amount credit max amount reference: + - title: 2021 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1 - title: 2022 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 - title: 2023 Saskatchewan Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) - href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml index 3ca6e71c5..ba8683ef2 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -6,20 +6,23 @@ metadata: rate_unit: /1 label: Saskatchewan age amount credit reduction rate reference: + - title: Worksheet for the 2021 Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1 - title: Worksheet for the 2022 Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1 - title: Worksheet for the 2023 Personal Tax Credit Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf - - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Page 15, Age Credit 17(1) - href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 brackets: - threshold: - 2022-01-01: 0 + 2021-01-01: 0 rate: - 2022-01-01: 0 + 2021-01-01: 0 - threshold: + 2021-01-01: 36_794 2022-01-01: 37_677 2023-01-01: 40_051 rate: - 2022-01-01: 0.15 + 2021-01-01: 0.15 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml index 4f9b7d99e..1f4aaa803 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -1,40 +1,78 @@ +- name: Ineligible + period: 2021 + input: + province_code: SK + age: 64 + individual_net_income: 20_000 + output: + sk_age_amount: 0 + + +- name: Eligible and net income below base amount + period: 2021 + input: + province_code: SK + age: 70 + individual_net_income: 35_000 + output: + sk_age_amount: 4_942 + + +- name: Eligible and net income between base net income amount and maximum net income amount # 4_942 - ((60_000 - 36_794) * 0.15) + period: 2021 + input: + province_code: SK + age: 65 + individual_net_income: 60_000 + output: + sk_age_amount: 1_461.1 + + +- name: Eligible over maximum net income amount + period: 2021 + input: + province_code: SK + age: 68 + individual_net_income: 100_000 + output: + sk_age_amount: 0 + - name: Ineligible period: 2022 input: province_code: SK age: 64 individual_net_income: 20_000 - is_head: false output: sk_age_amount: 0 + - name: Eligible and net income below base amount period: 2022 input: province_code: SK age: 70 individual_net_income: 35_000 - is_head: true output: sk_age_amount: 5_061 + - name: Eligible and net income between base net income amount and maximum net income amount # 5_061 - ((60_000 - 37_677) * 0.15) period: 2022 input: province_code: SK age: 65 individual_net_income: 60_000 - is_head: true output: sk_age_amount: 1_712.55 + - name: Eligible over maximum net income amount period: 2022 input: province_code: SK age: 68 individual_net_income: 100_000 - is_head: true output: sk_age_amount: 0 @@ -45,39 +83,29 @@ province_code: SK age: 64 individual_net_income: 20_000 - is_head: true output: sk_age_amount: 0 + - name: Eligible and net income below base amount period: 2023 input: province_code: SK age: 65 individual_net_income: 40_000 - is_head: true output: sk_age_amount: 5_380 + - name: Eligible and net income between base net income amount and maximum net income amount # 5_380 - ((60_000 - 40_051) * 0.15) period: 2023 input: province_code: SK age: 65 individual_net_income: 60_000 - is_head: true output: sk_age_amount: 2_387.65 - -- name: Not head - ineligible - period: 2023 - input: - province_code: SK - age: 65 - individual_net_income: 60_000 - is_head: false - output: - sk_age_amount: 0 + - name: Eligible over maximum net income amount period: 2023 @@ -85,6 +113,5 @@ province_code: SK age: 65 individual_net_income: 100_000 - is_head: true output: sk_age_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index bc132fd63..c045c0df6 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -23,6 +23,5 @@ def formula(person, period, parameters): age_eligible = age >= p.age_eligibility reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - is_head = person("is_head", period) - eligible = is_head & age_eligible + eligible = age_eligible return eligible * reduced_amount From 57fdffb7c2bd7faa6ff601bd8b13e11c3bbae8fa Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Tue, 8 Aug 2023 21:14:14 +0000 Subject: [PATCH 39/69] Fix according to comments --- .../sk/tax/income/credits/disability_amount/amount.yaml | 8 ++++---- .../credits/disability_amount/sk_disability_amount.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml index 4e16eee56..fee807e6c 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -6,10 +6,10 @@ metadata: unit: currency-CAD label: Saskatchewan disability amount reference: - - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 5 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 - title: Saskatchewan I2-01 The Income Tax Act, 2000, Page 25, Mental or physical impairment credit (23), (1) href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 5 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py index 7b4a3c830..7a76ad103 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py @@ -4,8 +4,8 @@ class sk_disability_amount(Variable): value_type = float entity = Person - unit: CAD - label = "Saskatchewan Disability Amount Tax Credit" + unit = CAD + label = "Saskatchewan disability amount tax credit" definition_period = YEAR defined_for = ProvinceCode.SK @@ -16,4 +16,4 @@ def formula(person, period, parameters): disabled = person("is_disabled", period) is_head = person("is_head", period) eligbile = is_head & disabled - return where(eligbile, p.amount, 0) + return eligible * p.amount From 30e9fb53b5bd55c2522c677ca505685cbd682025 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Tue, 8 Aug 2023 22:30:04 +0000 Subject: [PATCH 40/69] Fix according to comments. --- .../sk_senior_supplementary/age_threshold.yaml | 11 +++++------ .../credits/sk_senior_supplementary/amount.yaml | 8 ++++---- .../sk_senior_supplementary_credit.yaml | 15 ++++++++++++++- .../sk_senior_supplementary_credit.py | 5 ++++- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index 2facd5f8c..81159293f 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -1,17 +1,16 @@ -description: Saskatchewan provides the senior supplementary tax credit for filers of or above this age threshold. +description: Saskatchewan provides the senior supplementary tax credit for filers at or above this age threshold. values: 2022-01-01: 65 - 2023-01-01: 65 metadata: unit: year label: Saskatchewan senior supplementary tax credit eligible age-threshold reference: - - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - title: Saskatchewan I2-01 The Income Tax Act, 2000 href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 0d70f4b83..4252b575f 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -6,11 +6,11 @@ metadata: unit: currency-CAD label: Saskatchewan Senior Supplementary tax credit amount reference: - - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - title: Saskatchewan I2-01 The Income Tax Act, 2000 href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index 8f935178b..cb5f9d0ea 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -3,14 +3,16 @@ input: province_code: SK age: 64 + is_head: true output: sk_senior_supplementary_credit: 0 - name: 2023 SK senior supplementary tax credit - At age threshold - period: 2024 + period: 2023 input: province_code: SK age: 65 + is_head: true output: sk_senior_supplementary_credit: 1_421 @@ -19,6 +21,7 @@ input: province_code: SK age: 68 + is_head: true output: sk_senior_supplementary_credit: 1_421 @@ -27,5 +30,15 @@ input: province_code: SK age: 68 + is_head: true output: sk_senior_supplementary_credit: 1_336 + +- name: 2023 SK senior supplementary tax credit - Not the household host + period: 2024 + input: + province_code: SK + age: 65 + is_head: false + output: + sk_senior_supplementary_credit: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index 52c38dc25..856a2ac0c 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -3,6 +3,7 @@ class sk_senior_supplementary_credit(Variable): value_type = float + unit = CAD entity = Person label = "Sasktachewan senior supplementary tax credit" definition_period = YEAR @@ -13,4 +14,6 @@ def formula(person, period, parameters): period ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary age = person("age", period) - return where(age >= p.age_threshold, p.amount, 0) + is_head = person("is_head", period) + eligibility = where((age >= p.age_threshold) & is_head, 1, 0) + return eligibility * p.amount From b5a972ca92e6f1d86d8d0037e3afd198b92a64ad Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Tue, 8 Aug 2023 23:02:56 +0000 Subject: [PATCH 41/69] Add reference page number. --- .../tax/income/credits/age_amount/sk_age_amount.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index c045c0df6..53e744df7 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -8,11 +8,13 @@ class sk_age_amount(Variable): unit = CAD definition_period = YEAR reference = ( - "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf", - "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf", - "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf", - "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf", - "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1", + "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15", ) defined_for = ProvinceCode.SK From 23e53add8800f7329ab6ece200ccfb2632a0e504 Mon Sep 17 00:00:00 2001 From: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:29:11 +0200 Subject: [PATCH 42/69] Update policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py --- .../provinces/sk/tax/income/credits/age_amount/sk_age_amount.py | 1 - 1 file changed, 1 deletion(-) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 53e744df7..2a4c1ab1d 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -25,5 +25,4 @@ def formula(person, period, parameters): age_eligible = age >= p.age_eligibility reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - eligible = age_eligible return eligible * reduced_amount From 06457964f00689a5ee28d75a341c9daae9bf231f Mon Sep 17 00:00:00 2001 From: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:29:18 +0200 Subject: [PATCH 43/69] Update policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py --- .../provinces/sk/tax/income/credits/age_amount/sk_age_amount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 2a4c1ab1d..8b6c5c3a3 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -25,4 +25,4 @@ def formula(person, period, parameters): age_eligible = age >= p.age_eligibility reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - return eligible * reduced_amount + return age_eligible * reduced_amount From a81674408214b0418a89a95ce31ba1fb0245261a Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 10 Aug 2023 05:07:44 +0000 Subject: [PATCH 44/69] Add a new variable --- .../credits/age_amount/sk_age_amount.py | 6 ++--- .../age_amount/sk_age_amount_eligible.py | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 53e744df7..293372e53 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -21,9 +21,7 @@ class sk_age_amount(Variable): def formula(person, period, parameters): p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount income = person("individual_net_income", period) - age = person("age", period) - age_eligible = age >= p.age_eligibility + defined_for = person("sk_age_amount_eligible", period) reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - eligible = age_eligible - return eligible * reduced_amount + return defined_for * reduced_amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py new file mode 100644 index 000000000..0cf5b31c5 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py @@ -0,0 +1,25 @@ +from policyengine_canada.model_api import * + + +class sk_age_amount_eligible(Variable): + value_type = bool + entity = Person + label = "Saskatchewan age amount eligibility" + unit = CAD + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1", + "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15", + ) + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount + age = person("age", period) + age_eligible = age >= p.age_eligibility + return age_eligible From 2ed0cff00a12eae7ea00963d8aecd22aa3c8e832 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Thu, 10 Aug 2023 05:14:18 +0000 Subject: [PATCH 45/69] Fixed Saskatchewan Age Amount #353 --- .../sk/tax/income/credits/age_amount/sk_age_amount.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 9f96ce019..293372e53 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -24,5 +24,4 @@ def formula(person, period, parameters): defined_for = person("sk_age_amount_eligible", period) reduction = p.reduction.rate.calc(income) reduced_amount = max_(p.max_amount - reduction, 0) - eligible = age_eligible - return eligible * reduced_amount + return defined_for * reduced_amount From b5bf783c7b2ff1d20e8c176ac8f4a4504d853a83 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:23:03 +0000 Subject: [PATCH 46/69] Improve --- .../credits/sk_senior_supplementary/age_threshold.yaml | 5 +++-- .../tax/income/credits/sk_senior_supplementary/amount.yaml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index 81159293f..828c66db1 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -3,14 +3,15 @@ values: 2022-01-01: 65 metadata: unit: year - label: Saskatchewan senior supplementary tax credit eligible age-threshold + label: Saskatchewan senior supplementary tax credit age threshold reference: - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf + #Do not use this calculation file for this policy. - title: Saskatchewan I2-01 The Income Tax Act, 2000 - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page24 - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 4252b575f..fe8828674 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides this amount under the senior supplement credit. +description: Saskatchewan allows for this amount under the senior supplement credit. values: 2022-01-01: 1_336 2023-01-01: 1_421 @@ -10,7 +10,8 @@ metadata: href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf + #Do not use this calculation file for this policy. - title: Saskatchewan I2-01 The Income Tax Act, 2000 - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page24 - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 From c87aa5c67106a39975a21b2c9d44bfc18c8bd8df Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:33:03 +0000 Subject: [PATCH 47/69] Fix --- .../sk/tax/income/credits/disability_amount/amount.yaml | 5 +++-- .../income/credits/disability_amount/sk_disability_amount.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml index fee807e6c..7c87e853f 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -7,9 +7,10 @@ metadata: label: Saskatchewan disability amount reference: - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 5 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - title: Saskatchewan I2-01 The Income Tax Act, 2000, Page 25, Mental or physical impairment credit (23), (1) href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf + #Cannot find the legal cite. - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 5 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py index 7a76ad103..cc78ea2d2 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py @@ -15,5 +15,5 @@ def formula(person, period, parameters): ).gov.provinces.sk.tax.income.credits.disability_amount disabled = person("is_disabled", period) is_head = person("is_head", period) - eligbile = is_head & disabled + eligible = is_head & disabled return eligible * p.amount From 72c5e2a8510b78b18e68f30aeb240a13cdc48d91 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:58:02 +0000 Subject: [PATCH 48/69] Change --- .../income/credits/sk_senior_supplementary/age_threshold.yaml | 2 +- .../sk/tax/income/credits/sk_senior_supplementary/amount.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index 828c66db1..97f19096e 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides the senior supplementary tax credit for filers at or above this age threshold. +description: Saskatchewan provides the senior supplementary amount for filers at or above this age threshold. values: 2022-01-01: 65 metadata: diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index fe8828674..717ae6329 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan allows for this amount under the senior supplement credit. +description: Saskatchewan allows for this amount under the senior supplementary amount. values: 2022-01-01: 1_336 2023-01-01: 1_421 From d58d721618bbbf62d873f98bc052567b19041d81 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:17:09 +0000 Subject: [PATCH 49/69] Resolved comments --- .../credits/age_amount/sk_age_amount.yaml | 24 ++++----- .../age_amount/sk_age_amount_eligible.yaml | 52 +++++++++++++++++++ .../credits/age_amount/sk_age_amount.py | 6 +-- .../age_amount/sk_age_amount_eligible.py | 3 +- 4 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml index 1f4aaa803..d82703f23 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -2,7 +2,7 @@ period: 2021 input: province_code: SK - age: 64 + sk_age_amount_eligible = false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -12,7 +12,7 @@ period: 2021 input: province_code: SK - age: 70 + sk_age_amount_eligible = true individual_net_income: 35_000 output: sk_age_amount: 4_942 @@ -22,7 +22,7 @@ period: 2021 input: province_code: SK - age: 65 + sk_age_amount_eligible = true individual_net_income: 60_000 output: sk_age_amount: 1_461.1 @@ -32,7 +32,7 @@ period: 2021 input: province_code: SK - age: 68 + sk_age_amount_eligible = true individual_net_income: 100_000 output: sk_age_amount: 0 @@ -41,7 +41,7 @@ period: 2022 input: province_code: SK - age: 64 + sk_age_amount_eligible = false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -51,7 +51,7 @@ period: 2022 input: province_code: SK - age: 70 + sk_age_amount_eligible = true individual_net_income: 35_000 output: sk_age_amount: 5_061 @@ -61,7 +61,7 @@ period: 2022 input: province_code: SK - age: 65 + sk_age_amount_eligible = true individual_net_income: 60_000 output: sk_age_amount: 1_712.55 @@ -71,7 +71,7 @@ period: 2022 input: province_code: SK - age: 68 + sk_age_amount_eligible = true individual_net_income: 100_000 output: sk_age_amount: 0 @@ -81,7 +81,7 @@ period: 2023 input: province_code: SK - age: 64 + sk_age_amount_eligible = false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -91,7 +91,7 @@ period: 2023 input: province_code: SK - age: 65 + sk_age_amount_eligible = true individual_net_income: 40_000 output: sk_age_amount: 5_380 @@ -101,7 +101,7 @@ period: 2023 input: province_code: SK - age: 65 + sk_age_amount_eligible = true individual_net_income: 60_000 output: sk_age_amount: 2_387.65 @@ -111,7 +111,7 @@ period: 2023 input: province_code: SK - age: 65 + sk_age_amount_eligible = true individual_net_income: 100_000 output: sk_age_amount: 0 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml new file mode 100644 index 000000000..f2c169a86 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml @@ -0,0 +1,52 @@ +- name: Ineligible Age + period: 2021 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible = false + + +- name: Eligible Age + period: 2021 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible = true + + +- name: Ineligible Age + period: 2022 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible = false + + +- name: Eligible Age + period: 2022 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible = true + + +- name: Ineligible Age + period: 2023 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible = false + + +- name: Eligible Age + period: 2023 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible = true diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py index 293372e53..f66962d69 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -16,12 +16,10 @@ class sk_age_amount(Variable): "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1", "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15", ) - defined_for = ProvinceCode.SK + defined_for = "sk_age_amount_eligible" def formula(person, period, parameters): p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount income = person("individual_net_income", period) - defined_for = person("sk_age_amount_eligible", period) reduction = p.reduction.rate.calc(income) - reduced_amount = max_(p.max_amount - reduction, 0) - return defined_for * reduced_amount + return max_(p.max_amount - reduction, 0) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py index 0cf5b31c5..8a743fe96 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py @@ -21,5 +21,4 @@ class sk_age_amount_eligible(Variable): def formula(person, period, parameters): p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount age = person("age", period) - age_eligible = age >= p.age_eligibility - return age_eligible + return age >= p.age_eligibility From 2719bda076a61b975164ad2b28fdbf02c33f3a70 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:17:19 +0000 Subject: [PATCH 50/69] Fix --- .../sk_senior_supplementary/age_threshold.yaml | 11 ++++------- .../credits/sk_senior_supplementary/amount.yaml | 11 ++++------- .../sk_senior_supplementary_credit.yaml | 13 ------------- .../sk_senior_supplementary_credit.py | 3 +-- 4 files changed, 9 insertions(+), 29 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index 97f19096e..d6a6fe93b 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -6,12 +6,9 @@ metadata: label: Saskatchewan senior supplementary tax credit age threshold reference: - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - #Do not use this calculation file for this policy. - - title: Saskatchewan I2-01 The Income Tax Act, 2000 - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page24 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Senior supplementary credit + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=24 - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index 717ae6329..e99fe2329 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -7,11 +7,8 @@ metadata: label: Saskatchewan Senior Supplementary tax credit amount reference: - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 - - title: 2023 Saskatchewan TD1SK-WS Personal Tax Credits Return - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf - #Do not use this calculation file for this policy. - - title: Saskatchewan I2-01 The Income Tax Act, 2000 - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page24 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Senior supplementary credit + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=24 - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index cb5f9d0ea..39932d476 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -3,7 +3,6 @@ input: province_code: SK age: 64 - is_head: true output: sk_senior_supplementary_credit: 0 @@ -12,7 +11,6 @@ input: province_code: SK age: 65 - is_head: true output: sk_senior_supplementary_credit: 1_421 @@ -21,7 +19,6 @@ input: province_code: SK age: 68 - is_head: true output: sk_senior_supplementary_credit: 1_421 @@ -30,15 +27,5 @@ input: province_code: SK age: 68 - is_head: true output: sk_senior_supplementary_credit: 1_336 - -- name: 2023 SK senior supplementary tax credit - Not the household host - period: 2024 - input: - province_code: SK - age: 65 - is_head: false - output: - sk_senior_supplementary_credit: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index 856a2ac0c..af71f9a3a 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -14,6 +14,5 @@ def formula(person, period, parameters): period ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary age = person("age", period) - is_head = person("is_head", period) - eligibility = where((age >= p.age_threshold) & is_head, 1, 0) + eligibility = where(age >= p.age_threshold, 1, 0) return eligibility * p.amount From 4998bffa6df7e6532b61f3df52457dafe4fe789d Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:24:24 +0000 Subject: [PATCH 51/69] Fix --- .../tax/income/credits/disability_amount/amount.yaml | 7 +++---- .../sk/tax/income/credits/sk_disability_amount.yaml | 12 ------------ .../disability_amount/sk_disability_amount.py | 4 +--- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml index 7c87e853f..b01e17fe8 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -7,10 +7,9 @@ metadata: label: Saskatchewan disability amount reference: - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 5 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 - title: Saskatchewan I2-01 The Income Tax Act, 2000, Page 25, Mental or physical impairment credit (23), (1) - href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf - #Cannot find the legal cite. + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=25&26 - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 5 - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml index d1e59a83e..c58e69692 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml @@ -2,7 +2,6 @@ period: 2023 input: province_code: SK - is_head: true is_disabled: true output: sk_disability_amount: 10_405 @@ -11,7 +10,6 @@ period: 2024 input: province_code: SK - is_head: true is_disabled: false output: sk_disability_amount: 0 @@ -20,16 +18,6 @@ period: 2022 input: province_code: SK - is_head: true is_disabled: true output: sk_disability_amount: 9_789 - -- name: Disabled, not head - period: 2024 - input: - province_code: SK - is_head: false - is_disabled: true - output: - sk_disability_amount: 0 diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py index cc78ea2d2..196c5429f 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py @@ -14,6 +14,4 @@ def formula(person, period, parameters): period ).gov.provinces.sk.tax.income.credits.disability_amount disabled = person("is_disabled", period) - is_head = person("is_head", period) - eligible = is_head & disabled - return eligible * p.amount + return disabled * p.amount From ea751ec11b7312a81c4d3afa661fbd55848620d0 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Wed, 16 Aug 2023 17:50:20 +0000 Subject: [PATCH 52/69] Separate variables but leads to all tests failed. --- .../sk_senior_supplementary_credit.yaml | 10 +++++++--- .../sk_senior_supplementary_credit.py | 5 ++--- .../sk_senior_supplementary_credit_eligible.py | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index 39932d476..1f3a80a27 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -1,9 +1,10 @@ -- name: 2023 SK senior supplementary tax credit - Under age threshold +- name: 2024 SK senior supplementary tax credit - Under age threshold period: 2024 input: province_code: SK age: 64 output: + sk_senior_supplementary_credit_eligible: false sk_senior_supplementary_credit: 0 - name: 2023 SK senior supplementary tax credit - At age threshold @@ -12,14 +13,16 @@ province_code: SK age: 65 output: + sk_senior_supplementary_credit_eligible: true sk_senior_supplementary_credit: 1_421 -- name: 2023 SK senior supplementary tax credit - Above age threshold +- name: 2024 SK senior supplementary tax credit - Above age threshold period: 2024 input: province_code: SK age: 68 output: + sk_senior_supplementary_credit_eligible: true sk_senior_supplementary_credit: 1_421 - name: 2022 SK senior supplementary tax credit - Above age threshold @@ -28,4 +31,5 @@ province_code: SK age: 68 output: - sk_senior_supplementary_credit: 1_336 + sk_senior_supplementary_credit_eligible: true + sk_senior_supplementary_credit: 1_336 \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index af71f9a3a..8760370ea 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -7,12 +7,11 @@ class sk_senior_supplementary_credit(Variable): entity = Person label = "Sasktachewan senior supplementary tax credit" definition_period = YEAR - defined_for = ProvinceCode.SK + defined_for = "sk_senior_supplementary_credit" def formula(person, period, parameters): p = parameters( period ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary - age = person("age", period) - eligibility = where(age >= p.age_threshold, 1, 0) + eligibility = person("sk_senior_supplementary_credit_eligible", period) return eligibility * p.amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py new file mode 100644 index 000000000..1a96fd615 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py @@ -0,0 +1,16 @@ +from policyengine_canada.model_api import * + + +class sk_senior_supplementary_credit_eligible(Variable): + value_type = bool + entity = Person + label = "Sasktachewan senior supplementary tax credit eligibility" + definition_period = YEAR + defined_for = "sk_senior_supplementary_credit" + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary + age = person("age", period) + return age >= p.age_threshold \ No newline at end of file From 282ad04ff95d8315102250a3ff78d23b2b238214 Mon Sep 17 00:00:00 2001 From: LanxueHe <103899111+Snownow0w@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:49:49 +0000 Subject: [PATCH 53/69] Resolved comments. --- .../credits/age_amount/sk_age_amount.yaml | 24 +++++++++---------- .../age_amount/sk_age_amount_eligible.yaml | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml index d82703f23..5a17ffcd7 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -2,7 +2,7 @@ period: 2021 input: province_code: SK - sk_age_amount_eligible = false + sk_age_amount_eligible: false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -12,7 +12,7 @@ period: 2021 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 35_000 output: sk_age_amount: 4_942 @@ -22,7 +22,7 @@ period: 2021 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 60_000 output: sk_age_amount: 1_461.1 @@ -32,7 +32,7 @@ period: 2021 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 100_000 output: sk_age_amount: 0 @@ -41,7 +41,7 @@ period: 2022 input: province_code: SK - sk_age_amount_eligible = false + sk_age_amount_eligible: false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -51,7 +51,7 @@ period: 2022 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 35_000 output: sk_age_amount: 5_061 @@ -61,7 +61,7 @@ period: 2022 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 60_000 output: sk_age_amount: 1_712.55 @@ -71,7 +71,7 @@ period: 2022 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 100_000 output: sk_age_amount: 0 @@ -81,7 +81,7 @@ period: 2023 input: province_code: SK - sk_age_amount_eligible = false + sk_age_amount_eligible: false individual_net_income: 20_000 output: sk_age_amount: 0 @@ -91,7 +91,7 @@ period: 2023 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 40_000 output: sk_age_amount: 5_380 @@ -101,7 +101,7 @@ period: 2023 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 60_000 output: sk_age_amount: 2_387.65 @@ -111,7 +111,7 @@ period: 2023 input: province_code: SK - sk_age_amount_eligible = true + sk_age_amount_eligible: true individual_net_income: 100_000 output: sk_age_amount: 0 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml index f2c169a86..d96fca067 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml @@ -4,7 +4,7 @@ province_code: SK age: 64 output: - sk_age_amount_eligible = false + sk_age_amount_eligible: false - name: Eligible Age @@ -13,7 +13,7 @@ province_code: SK age: 70 output: - sk_age_amount_eligible = true + sk_age_amount_eligible: true - name: Ineligible Age @@ -22,7 +22,7 @@ province_code: SK age: 64 output: - sk_age_amount_eligible = false + sk_age_amount_eligible: false - name: Eligible Age @@ -31,7 +31,7 @@ province_code: SK age: 70 output: - sk_age_amount_eligible = true + sk_age_amount_eligible: true - name: Ineligible Age @@ -40,7 +40,7 @@ province_code: SK age: 64 output: - sk_age_amount_eligible = false + sk_age_amount_eligible: false - name: Eligible Age @@ -49,4 +49,4 @@ province_code: SK age: 70 output: - sk_age_amount_eligible = true + sk_age_amount_eligible: true From 56ef2bb599d813cd749c6faec9e80776d124a4ae Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:47:33 +0000 Subject: [PATCH 54/69] modify --- .../income/credits/employment_amount/amount.yaml} | 7 ++++--- .../yt_employment_amount/yt_employment_amount.yaml | 6 +++--- .../yukon_employment_amount/yt_employment_amount.py | 10 ++++------ 3 files changed, 11 insertions(+), 12 deletions(-) rename policyengine_canada/parameters/gov/provinces/yt/{benefits/yt_employment_amount/yt_employment_amount.yaml => tax/income/credits/employment_amount/amount.yaml} (58%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml similarity index 58% rename from policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml rename to policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml index 76a2ee74d..21467df22 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/benefits/yt_employment_amount/yt_employment_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml @@ -5,7 +5,8 @@ metadata: unit: currency-CAD label: Yukon employment benefit amount reference: - - title: Canada Employment Amount Benefit for Yukon -Page 33 - href: https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf - - title: Canada Employment Amount Benefit for Yukon + - title: Yukon Tax Form YT428 - Line 58310 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=1 + #Credit is not mentioned in the Yukon income tax act + - title: Government of Canada - Yukon Information Guide href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml index fe5f37af5..0e0d46c31 100644 --- a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml @@ -2,7 +2,7 @@ period: 2022 input: province_code: YT - employment_income: 30000 + canada_employment_amount: 30_000 output: yt_employment_amount: 1_287 @@ -10,7 +10,7 @@ period: 2022 input: province_code: YT - employment_income: 0 + canada_employment_amount: 0 output: yt_employment_amount: 0 @@ -18,7 +18,7 @@ period: 2022 input: province_code: YT - employment_income: 1_000 + canada_employment_amount: 1_000 output: yt_employment_amount: 1_000 diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py index 0511f76d7..3929a7d82 100644 --- a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py @@ -11,10 +11,8 @@ class yt_employment_amount(Variable): reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310" def formula(person, period, parameters): - max_amount = parameters( + p = parameters( period - ).gov.provinces.yt.benefits.yt_employment_amount.yt_employment_amount - - employment_income = person("employment_income", period) - - return min_(employment_income, max_amount) + ).gov.provinces.yt.ta.income.credits.employment_amount + canada_employment_amount = person("cananda_employment_amount", period) + return min_(canada_employment_amount, p.amount) From b53a14ac8b3506f67332b9084667edf32cad1c81 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:51:22 +0000 Subject: [PATCH 55/69] modify --- .../yt/tax/income/credits/employment_amount/amount.yaml | 4 ++-- .../yt_employment_amount.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename policyengine_canada/variables/gov/provinces/yt/tax/income/{benefits/yukon_employment_amount => credits}/yt_employment_amount.py (85%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml index 21467df22..5d1ef6726 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml @@ -1,9 +1,9 @@ -description: Yukon provides this employment benefit amount. +description: Yukon provides this employment amount. values: 2022-01-01: 1_287 metadata: unit: currency-CAD - label: Yukon employment benefit amount + label: Yukon employment amount reference: - title: Yukon Tax Form YT428 - Line 58310 href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=1 diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py similarity index 85% rename from policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py rename to policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py index 3929a7d82..303a0eb9c 100644 --- a/policyengine_canada/variables/gov/provinces/yt/tax/income/benefits/yukon_employment_amount/yt_employment_amount.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py @@ -4,7 +4,7 @@ class yt_employment_amount(Variable): value_type = float entity = Person - label = "Yukon Employment Benefit Amount" + label = "Yukon Employment Amount" unit = CAD definition_period = YEAR defined_for = ProvinceCode.YT @@ -13,6 +13,6 @@ class yt_employment_amount(Variable): def formula(person, period, parameters): p = parameters( period - ).gov.provinces.yt.ta.income.credits.employment_amount + ).gov.provinces.yt.tax.income.credits.employment_amount canada_employment_amount = person("cananda_employment_amount", period) return min_(canada_employment_amount, p.amount) From b7d364c77d13c3547b0663558be9b3062b600b76 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 16 Aug 2023 23:01:41 +0000 Subject: [PATCH 56/69] modify --- .../gov/provinces/yt/tax/income/credits/yt_employment_amount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py index 303a0eb9c..c87dbddab 100644 --- a/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py @@ -14,5 +14,5 @@ def formula(person, period, parameters): p = parameters( period ).gov.provinces.yt.tax.income.credits.employment_amount - canada_employment_amount = person("cananda_employment_amount", period) + canada_employment_amount = person("canada_employment_amount", period) return min_(canada_employment_amount, p.amount) From 0e8aa600523118cb0ca3bbe857d8451b986e5cf8 Mon Sep 17 00:00:00 2001 From: Yaohhhh <128541260+Yaohhhh@users.noreply.github.com> Date: Thu, 17 Aug 2023 22:52:57 +0000 Subject: [PATCH 57/69] Fix --- .../sk_senior_supplementary_credit.yaml | 22 ++++++++---------- .../sk_senior_supplementary_eligible.yaml | 23 +++++++++++++++++++ .../sk_senior_supplementary_credit.py | 2 +- ...sk_senior_supplementary_credit_eligible.py | 4 ++-- 4 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml index 1f3a80a27..bed2d1879 100644 --- a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -1,35 +1,31 @@ -- name: 2024 SK senior supplementary tax credit - Under age threshold +- name: 2024 SK senior supplementary tax credit - non eligible period: 2024 input: province_code: SK - age: 64 - output: sk_senior_supplementary_credit_eligible: false + output: sk_senior_supplementary_credit: 0 -- name: 2023 SK senior supplementary tax credit - At age threshold +- name: 2023 SK senior supplementary tax credit - eligible period: 2023 input: province_code: SK - age: 65 - output: sk_senior_supplementary_credit_eligible: true + output: sk_senior_supplementary_credit: 1_421 -- name: 2024 SK senior supplementary tax credit - Above age threshold +- name: 2024 SK senior supplementary tax credit - eligible period: 2024 input: province_code: SK - age: 68 - output: sk_senior_supplementary_credit_eligible: true + output: sk_senior_supplementary_credit: 1_421 -- name: 2022 SK senior supplementary tax credit - Above age threshold +- name: 2022 SK senior supplementary tax credit - eligible period: 2022 input: province_code: SK - age: 68 - output: sk_senior_supplementary_credit_eligible: true - sk_senior_supplementary_credit: 1_336 \ No newline at end of file + output: + sk_senior_supplementary_credit: 1_336 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml new file mode 100644 index 000000000..8a5612a3c --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml @@ -0,0 +1,23 @@ +- name: SK senior supplementary tax credit - Under age threshold + period: 2024 + input: + province_code: SK + age: 64 + output: + sk_senior_supplementary_credit_eligible: false + +- name: SK senior supplementary tax credit - At age threshold + period: 2023 + input: + province_code: SK + age: 65 + output: + sk_senior_supplementary_credit_eligible: true + +- name: SK senior supplementary tax credit - Above age threshold + period: 2024 + input: + province_code: SK + age: 68 + output: + sk_senior_supplementary_credit_eligible: true diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py index 8760370ea..3115f73dc 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -7,7 +7,7 @@ class sk_senior_supplementary_credit(Variable): entity = Person label = "Sasktachewan senior supplementary tax credit" definition_period = YEAR - defined_for = "sk_senior_supplementary_credit" + defined_for = "sk_senior_supplementary_credit_eligible" def formula(person, period, parameters): p = parameters( diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py index 1a96fd615..862148040 100644 --- a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py @@ -6,11 +6,11 @@ class sk_senior_supplementary_credit_eligible(Variable): entity = Person label = "Sasktachewan senior supplementary tax credit eligibility" definition_period = YEAR - defined_for = "sk_senior_supplementary_credit" + defined_for = ProvinceCode.SK def formula(person, period, parameters): p = parameters( period ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary age = person("age", period) - return age >= p.age_threshold \ No newline at end of file + return age >= p.age_threshold From ccf74b7532a29d2ff799256dbbbf088afaf08ecd Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Fri, 18 Aug 2023 03:49:03 +0000 Subject: [PATCH 58/69] Update PolicyEngine Canada --- CHANGELOG.md | 7 +++++++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d74690035..6705cd961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.77.0] - 2023-08-18 03:48:59 + +### Added + +- Saskatchewan disability amount. + ## [0.76.0] - 2023-08-11 04:31:59 ### Added @@ -588,6 +594,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.77.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.76.0...0.77.0 [0.76.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.75.0...0.76.0 [0.75.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.74.0...0.75.0 [0.74.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.73.0...0.74.0 diff --git a/changelog.yaml b/changelog.yaml index 56267c24d..b15cf9fe2 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -481,3 +481,8 @@ added: - Alberta age credit. date: 2023-08-11 04:31:59 +- bump: minor + changes: + added: + - Saskatchewan disability amount. + date: 2023-08-18 03:48:59 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index d445c5644..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: minor - changes: - added: - - Saskatchewan disability amount. diff --git a/setup.py b/setup.py index 42bfff573..faab07773 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.76.0", + version="0.77.0", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[ From fbe2aead1c12cc0e071db25693526973afb330bf Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 17 Aug 2023 23:52:08 -0400 Subject: [PATCH 59/69] Update policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml --- .../income/credits/sk_senior_supplementary/age_threshold.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml index d6a6fe93b..a4e49fa75 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan provides the senior supplementary amount for filers at or above this age threshold. +description: Saskatchewan provides the senior supplementary amount for filers this age or older. values: 2022-01-01: 65 metadata: From d53f9f0c5a16c610b7a4ce58e2df3a9291295f1f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 17 Aug 2023 23:52:16 -0400 Subject: [PATCH 60/69] Update policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml --- .../sk/tax/income/credits/sk_senior_supplementary/amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml index e99fe2329..0da5ed3fc 100644 --- a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -1,4 +1,4 @@ -description: Saskatchewan allows for this amount under the senior supplementary amount. +description: Saskatchewan provides this senior supplementary amount. values: 2022-01-01: 1_336 2023-01-01: 1_421 From 5cc3a24d3b742046aebeef3f7d8bda71bb58d79f Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Fri, 18 Aug 2023 03:53:23 +0000 Subject: [PATCH 61/69] Update PolicyEngine Canada --- CHANGELOG.md | 7 +++++++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6705cd961..0597aed7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.78.0] - 2023-08-18 03:53:19 + +### Added + +- Saskatchewan Senior Supplementary amount Tax Credit. + ## [0.77.0] - 2023-08-18 03:48:59 ### Added @@ -594,6 +600,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.78.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.77.0...0.78.0 [0.77.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.76.0...0.77.0 [0.76.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.75.0...0.76.0 [0.75.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.74.0...0.75.0 diff --git a/changelog.yaml b/changelog.yaml index b15cf9fe2..2d8a2136f 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -486,3 +486,8 @@ added: - Saskatchewan disability amount. date: 2023-08-18 03:48:59 +- bump: minor + changes: + added: + - Saskatchewan Senior Supplementary amount Tax Credit. + date: 2023-08-18 03:53:19 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index c04a1cc1d..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: minor - changes: - added: - - Saskatchewan Senior Supplementary amount Tax Credit. diff --git a/setup.py b/setup.py index faab07773..cb3c44013 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.77.0", + version="0.78.0", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[ From 5e2ecd835c01362681a8058338e6b05ff03feae2 Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Fri, 18 Aug 2023 04:11:50 +0000 Subject: [PATCH 62/69] Update PolicyEngine Canada --- CHANGELOG.md | 7 +++++++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0597aed7d..fb24a3e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.79.0] - 2023-08-18 04:11:47 + +### Added + +- Saskatchewan age amount tax credit. + ## [0.78.0] - 2023-08-18 03:53:19 ### Added @@ -600,6 +606,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.79.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.78.0...0.79.0 [0.78.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.77.0...0.78.0 [0.77.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.76.0...0.77.0 [0.76.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.75.0...0.76.0 diff --git a/changelog.yaml b/changelog.yaml index 2d8a2136f..e4f6aa949 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -491,3 +491,8 @@ added: - Saskatchewan Senior Supplementary amount Tax Credit. date: 2023-08-18 03:53:19 +- bump: minor + changes: + added: + - Saskatchewan age amount tax credit. + date: 2023-08-18 04:11:47 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index f4f5b0574..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: minor - changes: - added: - - Saskatchewan age amount tax credit. diff --git a/setup.py b/setup.py index cb3c44013..82f041ef9 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.78.0", + version="0.79.0", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[ From 76f0beacd2a2cf466873156ba8ef8da373c756d7 Mon Sep 17 00:00:00 2001 From: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> Date: Fri, 18 Aug 2023 23:46:48 +0300 Subject: [PATCH 63/69] Update policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml --- .../yt/tax/income/credits/employment_amount/amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml index 5d1ef6726..dbbd52b46 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml @@ -7,6 +7,6 @@ metadata: reference: - title: Yukon Tax Form YT428 - Line 58310 href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=1 - #Credit is not mentioned in the Yukon income tax act + # Credit is not mentioned in the Yukon income tax act - title: Government of Canada - Yukon Information Guide href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 From 8fcc285a82e2a8cb49049ac81fb6424b69c6eb15 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Sun, 20 Aug 2023 22:26:43 +0300 Subject: [PATCH 64/69] changelog --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 9cbbabb36..4d27a2538 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Yukon Employment Benefit. + - Yukon Employment Amount. From 595c2d82451d9f7a20987d43c9aa1d46062a4ff3 Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Sun, 20 Aug 2023 20:37:40 +0000 Subject: [PATCH 65/69] Update PolicyEngine Canada --- CHANGELOG.md | 7 +++++++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb24a3e7f..85e450135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.80.0] - 2023-08-20 20:37:37 + +### Added + +- Yukon Employment Amount. + ## [0.79.0] - 2023-08-18 04:11:47 ### Added @@ -606,6 +612,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.80.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.79.0...0.80.0 [0.79.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.78.0...0.79.0 [0.78.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.77.0...0.78.0 [0.77.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.76.0...0.77.0 diff --git a/changelog.yaml b/changelog.yaml index e4f6aa949..0af9376ac 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -496,3 +496,8 @@ added: - Saskatchewan age amount tax credit. date: 2023-08-18 04:11:47 +- bump: minor + changes: + added: + - Yukon Employment Amount. + date: 2023-08-20 20:37:37 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 4d27a2538..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: minor - changes: - added: - - Yukon Employment Amount. diff --git a/setup.py b/setup.py index 82f041ef9..ee73a3edb 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.79.0", + version="0.80.0", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[ From e8b0afe374dd99ea6c5200bd27db9a70aa29ef15 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Mon, 21 Aug 2023 22:59:23 +0300 Subject: [PATCH 66/69] Fix Manitoba parameter folder structure Fixes #434 --- changelog_entry.yaml | 4 ++++ .../mb/{ => tax/income}/credits/basic_personal_amount.yaml | 0 .../mb/tax/income/credits/mb_basic_personal_amount.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) rename policyengine_canada/parameters/gov/provinces/mb/{ => tax/income}/credits/basic_personal_amount.yaml (100%) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..2113825ce 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Manitoba BPA parameter folder structure. diff --git a/policyengine_canada/parameters/gov/provinces/mb/credits/basic_personal_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/basic_personal_amount.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/mb/credits/basic_personal_amount.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/basic_personal_amount.yaml diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py index 9c69c9ef9..bd3e6a57e 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py @@ -11,5 +11,5 @@ class mb_basic_personal_amount(Variable): defined_for = ProvinceCode.MB def formula(person, period, parameters): - p = parameters(period).gov.provinces.mb.credits + p = parameters(period).gov.provinces.mb.tax.income.credits return p.basic_personal_amount From 3b9ea8ca48cabb1586d5ce64483f1107c3c1c4f9 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Mon, 21 Aug 2023 23:03:17 +0300 Subject: [PATCH 67/69] Change the label of the Basic Personal Supplement Amount Fixes #420 --- changelog_entry.yaml | 4 ++++ .../basic_personal_amount/basic_personal_amount_supplement.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..0f35b3285 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixes: + - Canada Basic Personal Amount Supplement label. diff --git a/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py b/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py index 6ae50beb1..90808f107 100644 --- a/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py +++ b/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py @@ -4,7 +4,7 @@ class basic_personal_amount_supplement(Variable): value_type = float entity = Person - label = "Basic Personal Amount" + label = "Basic Personal Amount Supplement" unit = CAD definition_period = YEAR From 0e2bdc54a90289474767b2a85c0d3c9740d798ba Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Mon, 21 Aug 2023 20:22:12 +0000 Subject: [PATCH 68/69] Update PolicyEngine Canada --- CHANGELOG.md | 7 +++++++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e450135..9f5c11deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.80.1] - 2023-08-21 20:22:09 + +### Fixed + +- Manitoba BPA parameter folder structure. + ## [0.80.0] - 2023-08-20 20:37:37 ### Added @@ -612,6 +618,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.80.1]: https://github.com/PolicyEngine/policyengine-canada/compare/0.80.0...0.80.1 [0.80.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.79.0...0.80.0 [0.79.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.78.0...0.79.0 [0.78.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.77.0...0.78.0 diff --git a/changelog.yaml b/changelog.yaml index 0af9376ac..b395f4fa0 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -501,3 +501,8 @@ added: - Yukon Employment Amount. date: 2023-08-20 20:37:37 +- bump: patch + changes: + fixed: + - Manitoba BPA parameter folder structure. + date: 2023-08-21 20:22:09 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 2113825ce..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: patch - changes: - fixed: - - Manitoba BPA parameter folder structure. diff --git a/setup.py b/setup.py index ee73a3edb..32b816c55 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.80.0", + version="0.80.1", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[ From 43c099aa33d9c8fc196aa5a96a25f070b7d8dbbc Mon Sep 17 00:00:00 2001 From: "Github Actions[bot]" Date: Mon, 21 Aug 2023 20:36:45 +0000 Subject: [PATCH 69/69] Update PolicyEngine Canada --- CHANGELOG.md | 3 +++ changelog.yaml | 5 +++++ changelog_entry.yaml | 4 ---- setup.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f5c11deb..9f1ffd3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.80.2] - 2023-08-21 20:36:42 + ## [0.80.1] - 2023-08-21 20:22:09 ### Fixed @@ -618,6 +620,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.80.2]: https://github.com/PolicyEngine/policyengine-canada/compare/0.80.1...0.80.2 [0.80.1]: https://github.com/PolicyEngine/policyengine-canada/compare/0.80.0...0.80.1 [0.80.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.79.0...0.80.0 [0.79.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.78.0...0.79.0 diff --git a/changelog.yaml b/changelog.yaml index b395f4fa0..00e0276f2 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -506,3 +506,8 @@ fixed: - Manitoba BPA parameter folder structure. date: 2023-08-21 20:22:09 +- bump: patch + changes: + fixes: + - Canada Basic Personal Amount Supplement label. + date: 2023-08-21 20:36:42 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 0f35b3285..e69de29bb 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +0,0 @@ -- bump: patch - changes: - fixes: - - Canada Basic Personal Amount Supplement label. diff --git a/setup.py b/setup.py index 32b816c55..4214dfc91 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.80.1", + version="0.80.2", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[