From 98d34e6d6ad4fb536211ede9c44a8e1ade0f4909 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Tue, 16 Apr 2024 01:53:06 +0000 Subject: [PATCH] Alberta base personal credit Fixes #376 --- .../gov/provinces/ab/tax/income/credits/base.yaml | 10 ++++++++++ .../gov/provinces/ab/tax/income/credits/base.yaml | 6 ++++++ .../tax/income/credits/ab_base_personal_credit.py | 15 +++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/ab/tax/income/credits/base.yaml create mode 100644 policyengine_canada/tests/gov/provinces/ab/tax/income/credits/base.yaml create mode 100644 policyengine_canada/variables/gov/provinces/ab/tax/income/credits/ab_base_personal_credit.py diff --git a/policyengine_canada/parameters/gov/provinces/ab/tax/income/credits/base.yaml b/policyengine_canada/parameters/gov/provinces/ab/tax/income/credits/base.yaml new file mode 100644 index 000000000..2fcb70691 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ab/tax/income/credits/base.yaml @@ -0,0 +1,10 @@ +description: Alberta provides this maximum amount under the personal credit. +values: + 2023-01-01: 21_003 +metadata: + unit: currency-CAD + period: year + label: Alberta base personal credit maximum amount + reference: + - title: Alberta income tax personal credit + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/base.yaml b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/base.yaml new file mode 100644 index 000000000..1a6e1ac57 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/base.yaml @@ -0,0 +1,6 @@ +- name: Alberta Base + period: 2023 + input: + province_code: AB + output: + ab_base_personal_credit: 21_003 \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ab/tax/income/credits/ab_base_personal_credit.py b/policyengine_canada/variables/gov/provinces/ab/tax/income/credits/ab_base_personal_credit.py new file mode 100644 index 000000000..acc2a8b32 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ab/tax/income/credits/ab_base_personal_credit.py @@ -0,0 +1,15 @@ +from policyengine_canada.model_api import * + + +class ab_base_personal_credit(Variable): + value_type = float + entity = Person + label = "Alberta base personal credit" + unit = CAD + definition_period = YEAR + reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf" + defined_for = ProvinceCode.AB + + def formula(person, period, parameters): + base = parameters(period).gov.provinces.ab.tax.income.credits.base + return p