From d4dae07b47083828f6fa22dd8b5e781b1bc884e3 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:01:58 +0000 Subject: [PATCH 1/6] Yukon Pension Income Amount --- .../pension_income_amount/pension_income_amount.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml new file mode 100644 index 000000000..0883bf9d9 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml @@ -0,0 +1,9 @@ +description: Yukon Maximum Pension Amount for residents. +values: + 2022-01-01: 2_000 +metadata: + unit: currency-CAD + label: Yukon maximum pension amount + reference: + - title: Maximum Pension Amount + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf \ No newline at end of file From 9455be0fa2ab66c89ac9b07f6a404f1eccd01f65 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:25:47 +0000 Subject: [PATCH 2/6] Yukon Pension Income Amount --- .../credits/pension_amount/pension_amount.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml new file mode 100644 index 000000000..2fae7abf0 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml @@ -0,0 +1,16 @@ +- name: Below Maximum Pension Amount + period: 2022 + input: + province_code: YT + pension_and_savings_plan_income: 10_000 + output: + yt_pension_amount: 2_000 + +- name: Above Maximum Pension Amount + period: 2022 + input: + province_code: YT + pension_and_savings_plan_income: 0 + output: + yt_pension_amount: 0 + From 8d2e820d622cdb1c931647d0ed68b66f180e5647 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:37:45 +0000 Subject: [PATCH 3/6] Yukon Pension Income Amount --- changelog_entry.yaml | 1 + .../amount.yaml} | 6 ++--- .../sa/qc_sa_married_both_eligible.yaml | 2 +- .../sa/qc_sa_married_one_eligible.yaml | 2 +- .../yukon_child_benefit/yt_pension_amount.py | 22 +++++++++++++++++++ 5 files changed, 28 insertions(+), 5 deletions(-) rename policyengine_canada/parameters/gov/provinces/yt/tax/income/{pension_income_amount/pension_income_amount.yaml => pension_income/amount.yaml} (56%) create mode 100644 policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_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/yt/tax/income/pension_income_amount/pension_income_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml similarity index 56% rename from policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml rename to policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml index 0883bf9d9..03ca027dc 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income_amount/pension_income_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml @@ -1,9 +1,9 @@ -description: Yukon Maximum Pension Amount for residents. +description: Yukon provides this maximum pension income amount. values: 2022-01-01: 2_000 metadata: unit: currency-CAD - label: Yukon maximum pension amount + label: Yukon pension income max amount reference: - title: Maximum Pension Amount - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.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/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py new file mode 100644 index 000000000..070c889e0 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py @@ -0,0 +1,22 @@ +from policyengine_canada.model_api import * + + +class yt_pension_amount(Variable): + value_type = float + entity = Person + label = "Yukon Pension Amount" + definition_period = YEAR + defined_for = ProvinceCode.YT + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.yt.tax.income.pension_income + + pension_and_savings_income = person( + "pension_and_savings_plan_income", period + ) + + max_values = p.amount + + return min_(max_values, pension_and_savings_income) From 0f228216ed1f88448d0e72a625757db3966cee91 Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 6 Sep 2023 22:47:01 +0000 Subject: [PATCH 4/6] Yukon Pension Income Amount --- .../provinces/yt/tax/income/pension_income/amount.yaml | 4 ++-- .../{pension_amount.yaml => yt_pension_amount.yaml} | 0 .../yt/benefits/yukon_child_benefit/yt_pension_amount.py | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) rename policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/{pension_amount.yaml => yt_pension_amount.yaml} (100%) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml index 03ca027dc..9064938d3 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml @@ -5,5 +5,5 @@ metadata: unit: currency-CAD label: Yukon pension income max amount reference: - - title: Maximum Pension Amount - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf + - title: YT428 2022 - line 25 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page1 diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/yt_pension_amount.yaml similarity index 100% rename from policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/pension_amount.yaml rename to policyengine_canada/tests/gov/provinces/yt/tax/income/credits/pension_amount/yt_pension_amount.yaml diff --git a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py index 070c889e0..ecd7f3d6d 100644 --- a/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py +++ b/policyengine_canada/variables/gov/provinces/yt/benefits/yukon_child_benefit/yt_pension_amount.py @@ -9,14 +9,10 @@ class yt_pension_amount(Variable): defined_for = ProvinceCode.YT def formula(person, period, parameters): - p = parameters( - period - ).gov.provinces.yt.tax.income.pension_income + p = parameters(period).gov.provinces.yt.tax.income.pension_income pension_and_savings_income = person( "pension_and_savings_plan_income", period ) - max_values = p.amount - - return min_(max_values, pension_and_savings_income) + return min_(p.amount, pension_and_savings_income) From d4608f88c6b87f3ee4ae8dc8fed1a128b408c6df Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Wed, 6 Sep 2023 22:51:20 +0000 Subject: [PATCH 5/6] modified --- changelog_entry.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 8b1378917..fef273531 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1 +1,4 @@ - +- bump: minor + changes: + added: + - Yukon pension income amount. From d484a0d24ab5c53a088d611a08b4e2e103b6f71a Mon Sep 17 00:00:00 2001 From: sqw0418 <97478242+sqw0418@users.noreply.github.com> Date: Mon, 11 Sep 2023 21:11:43 +0000 Subject: [PATCH 6/6] Yukon Pension Income Amount Fixes #394 --- .../gov/provinces/yt/tax/income/pension_income/amount.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml index 9064938d3..c4a12fdac 100644 --- a/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/pension_income/amount.yaml @@ -6,4 +6,5 @@ metadata: label: Yukon pension income max amount reference: - title: YT428 2022 - line 25 + # Credit is not specified in the Yukon Income Tax Act href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page1