From a5dd2b21c96995d4e6da33133b892e8864b38abe Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:55:28 +0000 Subject: [PATCH 01/25] Manitoba Tuition and Education credit amount Fixes #335 -- tests awaiting Co-authored-by: Kingsley Yang --- .../eligible_tuition_amount.yaml | 10 ++++++++ .../full_time_students_amount.yaml | 9 +++++++ .../part_time_disabled_students_amount.yaml | 9 +++++++ .../part_time_students_amount.yaml | 9 +++++++ .../tuition_amount/mb_tuition_eligible.yaml | 15 ++++++++++++ .../mb_tuition_amount_credit.py | 24 +++++++++++++++++++ .../household/person/is_full_time_student.py | 8 +++++++ 7 files changed, 84 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml create mode 100644 policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml create mode 100644 policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py create mode 100644 policyengine_canada/variables/household/person/is_full_time_student.py diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml new file mode 100644 index 000000000..e5ce3dd5a --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -0,0 +1,10 @@ +description: Manitoba student tuition amount eligibility for accepting credit. +values: + 2023-01-01: 100 +metadata: + unit: currency-CAD + label: Manitoba students benefit eligibility + reference: + - title: Government of Canada - Manitoba Information Guide + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf + \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml new file mode 100644 index 000000000..8a00abcad --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml @@ -0,0 +1,9 @@ +description: Manitoba provides personal tax credit returns to full time student at educational institutions. +values: + 2023-01-01: 4800 #400/month * 12 +metadata: + unit: currency-CAD + label: Manitoba credit for full-time students + reference: + - title: Government of Canada - Manitoba Information Guide + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml new file mode 100644 index 000000000..4fd44895f --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml @@ -0,0 +1,9 @@ +description: Manitoba provides personal tax credit returns to disabled part time student at educational institutions. +values: + 2023-01-01: 4800 #400/month * 12 +metadata: + unit: currency-CAD + label: Manitoba credit for disabled part-time students + reference: + - title: Government of Canada - Manitoba Information Guide + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml new file mode 100644 index 000000000..d13f12ed1 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -0,0 +1,9 @@ +description: Manitoba provides personal tax credit returns to non-disabled part time student at educational institutions. +values: + 2023-01-01: 1440 #120/month * 12 +metadata: + unit: currency-CAD + label: Manitoba credit for non-disabled part-time students + reference: + - title: Government of Canada - Manitoba Information Guide + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf \ No newline at end of file diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml new file mode 100644 index 000000000..f52593ccd --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml @@ -0,0 +1,15 @@ +- name: Manitoba students credit tuition eligible + period: 2023 + input: + province_code: MB + tuition: 150 + output: + mb_student_tuition_credit_eligible: true + +- name: Manitoba students credit tuition ineligible + period: 2023 + input: + province_code: MB + tuition: 50 + output: + mb_student_tuition_credit_ineligible: false \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py new file mode 100644 index 000000000..3a727e80f --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -0,0 +1,24 @@ +from policyengine_canada.model_api import * + +class mb_tuition_amount_credit(Variable): + value_type = float + entity = Person + label = "Manitoba tuition amount credit" + definition_period = YEAR + defined_for = ProvinceCode.MB + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.mb.tax.income.credits.tuition_amount + + tuition = person("tuition_expenses", period) + tuition_eligible = tuition > p.eligible_tuition_amount + + # check if full-time student + full_time = person("is_full_time_student", period) + part_time = ~full_time + + # check if disabled + disabled = person("is_disabled", period) + nondisabled = ~disabled + + return tuition_eligible * (tuition + full_time * p.full_time_students + part_time * nondisabled * p.part_time_students + part_time * disabled * p.part_time_disabled) diff --git a/policyengine_canada/variables/household/person/is_full_time_student.py b/policyengine_canada/variables/household/person/is_full_time_student.py new file mode 100644 index 000000000..ff843f84a --- /dev/null +++ b/policyengine_canada/variables/household/person/is_full_time_student.py @@ -0,0 +1,8 @@ +from policyengine_canada.model_api import * + + +class is_full_time_student(Variable): + value_type = bool + entity = Person + label = "Is full time student" + definition_period = YEAR From 10eba5a8bedfe35fb77a5fe0b4312e690e67ff82 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Tue, 13 Jun 2023 03:35:50 +0000 Subject: [PATCH 02/25] Manitoba Tuition and Education credit amount Fixes #335 testings done --- changelog_entry.yaml | 5 +++ .../mb_tuition_amount_credit.yaml | 37 +++++++++++++++++++ .../tuition_amount/mb_tuition_eligible.yaml | 15 -------- .../mb_tuition_amount_credit.py | 2 +- 4 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml delete mode 100644 policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..5e9b3fa56 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,5 @@ +- bump: minor + changes: + added: + - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. + date: 2023-06-12 diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml new file mode 100644 index 000000000..9ba9ea857 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -0,0 +1,37 @@ +- name: Manitoba students credit tuition ineligible + period: 2023 + input: + province_code: MB + tuition_expenses: 50 + output: + mb_tuition_amount_credit: 0 + +- name: Manitoba students credit tuition eligible (Full time students) + period: 2023 + input: + province_code: MB + is_full_time_student: true + tuition_expenses: 20_000 + output: + mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 + +- name: Manitoba students credit tuition eligible (Part time students with disabilities) + period: 2023 + input: + province_code: MB + is_full_time_student: false + is_disabled: true + tuition_expenses: 20_000 + output: + mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 + + +- name: Manitoba students credit tuition eligible (Part time students without disabilities) + period: 2023 + input: + province_code: MB + is_full_time_student: false + is_disabled: false + tuition_expenses: 20_000 + output: + mb_tuition_amount_credit: 21_440 # 20_000 + 1_440 = 21_440 \ No newline at end of file diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml deleted file mode 100644 index f52593ccd..000000000 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_eligible.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: Manitoba students credit tuition eligible - period: 2023 - input: - province_code: MB - tuition: 150 - output: - mb_student_tuition_credit_eligible: true - -- name: Manitoba students credit tuition ineligible - period: 2023 - input: - province_code: MB - tuition: 50 - output: - mb_student_tuition_credit_ineligible: false \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index 3a727e80f..eb45696ff 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -21,4 +21,4 @@ def formula(person, period, parameters): disabled = person("is_disabled", period) nondisabled = ~disabled - return tuition_eligible * (tuition + full_time * p.full_time_students + part_time * nondisabled * p.part_time_students + part_time * disabled * p.part_time_disabled) + return tuition_eligible * (tuition + full_time * p.full_time_students_amount + part_time * nondisabled * p.part_time_students_amount + part_time * disabled * p.part_time_disabled_students_amount) From 8f5220a3d52c285c69ed5e748e041c1d0ab7a159 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Tue, 20 Jun 2023 22:45:32 +0000 Subject: [PATCH 03/25] Manitoba Tuition and Education credit amount Fixes #335 --- changelog_entry.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 5e9b3fa56..37f8e0d94 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,5 +1,4 @@ - bump: minor changes: added: - - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. - date: 2023-06-12 + - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit \ No newline at end of file From 0aa5f700bc3bb6e937d959645adbab62fbd41bd6 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:11:22 +0000 Subject: [PATCH 04/25] Manitoba Tuition and Education credit amount Fixes #335 --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 37f8e0d94..2056095fe 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit \ No newline at end of file + - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. \ No newline at end of file From 38c8e4e454a7e8e16c682a1f8d5ba69eeec940fb Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Thu, 22 Jun 2023 20:46:22 +0000 Subject: [PATCH 05/25] make format --- changelog_entry.yaml | 2 +- .../tuition_amount/eligible_tuition_amount.yaml | 2 +- .../tuition_amount/part_time_students_amount.yaml | 2 +- .../tuition_amount/mb_tuition_amount_credit.yaml | 2 +- .../tuition_amount/mb_tuition_amount_credit.py | 12 ++++++++++-- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 2056095fe..3dee2ab29 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. \ No newline at end of file + - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index e5ce3dd5a..42c566373 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -7,4 +7,4 @@ metadata: reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf - \ No newline at end of file + diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index d13f12ed1..ae47036d2 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -6,4 +6,4 @@ metadata: label: Manitoba credit for non-disabled part-time students reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf \ No newline at end of file + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml index 9ba9ea857..25397b109 100644 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -34,4 +34,4 @@ is_disabled: false tuition_expenses: 20_000 output: - mb_tuition_amount_credit: 21_440 # 20_000 + 1_440 = 21_440 \ No newline at end of file + mb_tuition_amount_credit: 21_440 # 20_000 + 1_440 = 21_440 diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index eb45696ff..fc87d617e 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -1,5 +1,6 @@ from policyengine_canada.model_api import * + class mb_tuition_amount_credit(Variable): value_type = float entity = Person @@ -8,7 +9,9 @@ class mb_tuition_amount_credit(Variable): defined_for = ProvinceCode.MB def formula(person, period, parameters): - p = parameters(period).gov.provinces.mb.tax.income.credits.tuition_amount + p = parameters( + period + ).gov.provinces.mb.tax.income.credits.tuition_amount tuition = person("tuition_expenses", period) tuition_eligible = tuition > p.eligible_tuition_amount @@ -21,4 +24,9 @@ def formula(person, period, parameters): disabled = person("is_disabled", period) nondisabled = ~disabled - return tuition_eligible * (tuition + full_time * p.full_time_students_amount + part_time * nondisabled * p.part_time_students_amount + part_time * disabled * p.part_time_disabled_students_amount) + return tuition_eligible * ( + tuition + + full_time * p.full_time_students_amount + + part_time * nondisabled * p.part_time_students_amount + + part_time * disabled * p.part_time_disabled_students_amount + ) From fa403fb3dc193a5f05ca7d3de4f8267e9e010484 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:00:26 -0400 Subject: [PATCH 06/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/part_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index ae47036d2..84935bc6c 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -6,4 +6,4 @@ metadata: label: Manitoba credit for non-disabled part-time students reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 From 39cac41771aaed4baff99d78c2694a75183a775a Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:00:38 -0400 Subject: [PATCH 07/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../income/credits/tuition_amount/eligible_tuition_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index 42c566373..8ef794769 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -1,4 +1,4 @@ -description: Manitoba student tuition amount eligibility for accepting credit. +description: Manitoba allows students with tuition above this amount to file for the tuition amount credit. values: 2023-01-01: 100 metadata: From 66a84e63b6574dd916b38a120e6d25ec3bbedfd3 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:00:50 -0400 Subject: [PATCH 08/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../income/credits/tuition_amount/eligible_tuition_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index 8ef794769..507e9488a 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -3,7 +3,7 @@ values: 2023-01-01: 100 metadata: unit: currency-CAD - label: Manitoba students benefit eligibility + label: Manitoba tuition amount credit expense eligibility reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf From 60e10adcc6e66acea489030200709457bc63733e Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:04 -0400 Subject: [PATCH 09/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/full_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml index 8a00abcad..66fc128a8 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml @@ -1,4 +1,4 @@ -description: Manitoba provides personal tax credit returns to full time student at educational institutions. +description: Manitoba extends this tuition amount to full-time students at educational institutions. values: 2023-01-01: 4800 #400/month * 12 metadata: From 07f183f8b0c748eb39650022dd44e12359689412 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:11 -0400 Subject: [PATCH 10/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/full_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml index 66fc128a8..c84acd30d 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml @@ -1,6 +1,6 @@ description: Manitoba extends this tuition amount to full-time students at educational institutions. values: - 2023-01-01: 4800 #400/month * 12 + 2023-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD label: Manitoba credit for full-time students From 8fb2d97df23ff1d4e316c9030e06981275ecd943 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:21 -0400 Subject: [PATCH 11/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/full_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml index c84acd30d..0b969a289 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml @@ -3,7 +3,7 @@ values: 2023-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD - label: Manitoba credit for full-time students + label: Manitoba tuition credit full-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf From dc8b98baeabacb36e0117462dad8ce084d724aa7 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:31 -0400 Subject: [PATCH 12/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../tuition_amount/part_time_disabled_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml index 4fd44895f..ee081172e 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml @@ -1,6 +1,6 @@ description: Manitoba provides personal tax credit returns to disabled part time student at educational institutions. values: - 2023-01-01: 4800 #400/month * 12 + 2023-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD label: Manitoba credit for disabled part-time students From b0a8aabddf0e4a7a0ebf4adb8f0fd7900cd66a86 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:38 -0400 Subject: [PATCH 13/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../tuition_amount/part_time_disabled_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml index ee081172e..d4dfcab06 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml @@ -3,7 +3,7 @@ values: 2023-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD - label: Manitoba credit for disabled part-time students + label: Manitoba tuition credit disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf From 2b325cfa38b3ba8d2e5571948c4bdc6245cbaa6e Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:46 -0400 Subject: [PATCH 14/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/part_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index 84935bc6c..2df7de32b 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -3,7 +3,7 @@ values: 2023-01-01: 1440 #120/month * 12 metadata: unit: currency-CAD - label: Manitoba credit for non-disabled part-time students + label: Manitoba tuition credit non-disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 From 4bd2aae24158083a10482f1cf5f1844206069f5a Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:01:52 -0400 Subject: [PATCH 15/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../tuition_amount/part_time_disabled_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml index d4dfcab06..b8bb83d4d 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml @@ -1,4 +1,4 @@ -description: Manitoba provides personal tax credit returns to disabled part time student at educational institutions. +description: Manitoba extends this tuition amount to non-disabled part-time students at educational institutions. values: 2023-01-01: 4_800 # 400/month * 12 metadata: From 41c4a04679ed2bd194397f9ff0ca4fdfc5fb6be5 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:02:11 -0400 Subject: [PATCH 16/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/part_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index 2df7de32b..a1bc002db 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -1,4 +1,4 @@ -description: Manitoba provides personal tax credit returns to non-disabled part time student at educational institutions. +description: Manitoba extends this tuition amount to non-disabled part-time students at educational institutions. values: 2023-01-01: 1440 #120/month * 12 metadata: From b4a035d09b3c161209aca9f43996ef0b90834899 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:02:21 -0400 Subject: [PATCH 17/25] Update policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> --- .../credits/tuition_amount/part_time_students_amount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index a1bc002db..b3dec3081 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -1,6 +1,6 @@ description: Manitoba extends this tuition amount to non-disabled part-time students at educational institutions. values: - 2023-01-01: 1440 #120/month * 12 + 2023-01-01: 1_440 # 120/month * 12 metadata: unit: currency-CAD label: Manitoba tuition credit non-disabled part-time student amount From ce4f91bc35e5c5ac6b5457281956c0f4c4a27dd2 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Tue, 8 Aug 2023 00:05:16 +0000 Subject: [PATCH 18/25] reference page number added --- .../income/credits/tuition_amount/eligible_tuition_amount.yaml | 2 +- .../credits/tuition_amount/full_time_students_amount.yaml | 2 +- .../tuition_amount/part_time_disabled_students_amount.yaml | 2 +- .../credits/tuition_amount/part_time_students_amount.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index 507e9488a..f1bcf4efe 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -6,5 +6,5 @@ metadata: label: Manitoba tuition amount credit expense eligibility reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf #page=1 diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml index 0b969a289..f1464ea6e 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/full_time_students_amount.yaml @@ -6,4 +6,4 @@ metadata: label: Manitoba tuition credit full-time student amount reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf #page=1 diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml index b8bb83d4d..7a0a51f03 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_disabled_students_amount.yaml @@ -6,4 +6,4 @@ metadata: label: Manitoba tuition credit disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf #page=1 diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml index b3dec3081..f7c80f7d8 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time_students_amount.yaml @@ -6,4 +6,4 @@ metadata: label: Manitoba tuition credit non-disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf #page=1 From 8e870fba472a04dba922677052e0b58313029f28 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:46:36 +0000 Subject: [PATCH 19/25] updates --- .../credits/tuition_amount/amount/full_time.yaml | 2 +- .../tuition_amount/eligible_tuition_amount.yaml | 2 +- .../tuition_amount/mb_tuition_amount_credit.py | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml index 79945e16a..f31d2cd06 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml @@ -8,4 +8,4 @@ metadata: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 \ 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/provincial-territorial-tax-credits-individuals/manitoba.html#page1 diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index 99ae7aa51..ca0e92a3c 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -8,4 +8,4 @@ metadata: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 \ 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/provincial-territorial-tax-credits-individuals/manitoba.html#page1 diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index fc87d617e..ac1b8aff1 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -18,15 +18,17 @@ def formula(person, period, parameters): # check if full-time student full_time = person("is_full_time_student", period) - part_time = ~full_time # check if disabled disabled = person("is_disabled", period) - nondisabled = ~disabled - return tuition_eligible * ( - tuition - + full_time * p.full_time_students_amount - + part_time * nondisabled * p.part_time_students_amount - + part_time * disabled * p.part_time_disabled_students_amount + tuition_addition = select( + [full_time, ~full_time & disabled, ~full_time & ~disabled], + [ + p.amount.full_time, + p.part_time.disabled, + p.part_time.non_disabled, + ], ) + + return tuition_eligible * (tuition + tuition_addition) From 9c58668f21f568e3bcc2f11911f21a0150ca1d3e Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Mon, 21 Aug 2023 22:32:40 +0000 Subject: [PATCH 20/25] reference added, parameter values updated --- .../income/credits/tuition_amount/amount/full_time.yaml | 6 +++--- .../credits/tuition_amount/eligible_tuition_amount.yaml | 6 +++--- .../income/credits/tuition_amount/part_time/disabled.yaml | 7 +++---- .../credits/tuition_amount/part_time/non_disabled.yaml | 6 +++--- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml index f31d2cd06..3edddbabb 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml @@ -1,11 +1,11 @@ description: Manitoba extends this tuition amount to full-time students at educational institutions. values: - 2023-01-01: 4_800 # 400/month * 12 + 2022-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD label: Manitoba tuition credit full-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml index ca0e92a3c..33378e5c9 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml @@ -1,11 +1,11 @@ description: Manitoba allows students with tuition above this amount to file for the tuition amount credit. values: - 2023-01-01: 100 + 2022-01-01: 100 metadata: unit: currency-CAD label: Manitoba tuition amount credit expense eligibility reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml index 6e7d9d3b5..1e8b1fd9d 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml @@ -1,12 +1,11 @@ description: Manitoba extends this tuition amount to disabled part-time students at educational institutions. values: - 2023-01-01: 4_800 # 400/month * 12 + 2022-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD label: Manitoba tuition credit disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 - + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml index fc6d245d2..3198e0992 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml @@ -1,11 +1,11 @@ description: Manitoba extends this tuition amount to non-disabled part-time students at educational institutions. values: - 2023-01-01: 1_440 # 120/month * 12 + 2022-01-01: 1_440 # 120/month * 12 metadata: unit: currency-CAD label: Manitoba tuition credit non-disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba Personal Income Tax - href: https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/provincial-territorial-tax-credits-individuals/manitoba.html#page1 + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) From 9f777971d6c16e88afda52af421967ce7c66d10b Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Sun, 3 Sep 2023 22:58:54 +0000 Subject: [PATCH 21/25] modifications --- changelog_entry.yaml | 2 +- .../tuition_amount/part_time/disabled.yaml | 2 +- .../part_time/non_disabled.yaml | 2 +- ...ion_amount.yaml => tuition_threshold.yaml} | 0 .../mb_tuition_amount_credit.yaml | 15 +++------------ .../mb_tuition_amount_credit_eligible.yaml | 15 +++++++++++++++ .../mb_tuition_amount_credit.py | 5 ++--- .../mb_tuition_amount_credit_eligible.py | 19 +++++++++++++++++++ 8 files changed, 42 insertions(+), 18 deletions(-) rename policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/{eligible_tuition_amount.yaml => tuition_threshold.yaml} (100%) create mode 100644 policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.yaml create mode 100644 policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 3dee2ab29..0fe9bc99e 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Manitoba Tuition and Education Amounts (full-time and part-time) Tax Credit. + - Manitoba tuition and education amount tax credit. diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml index 1e8b1fd9d..813a85efe 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml @@ -1,4 +1,4 @@ -description: Manitoba extends this tuition amount to disabled part-time students at educational institutions. +description: Manitoba extends this tuition amount to disabled part-time students. values: 2022-01-01: 4_800 # 400/month * 12 metadata: diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml index 3198e0992..a9f6a945e 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml @@ -1,4 +1,4 @@ -description: Manitoba extends this tuition amount to non-disabled part-time students at educational institutions. +description: Manitoba extends this tuition amount to non-disabled part-time students. values: 2022-01-01: 1_440 # 120/month * 12 metadata: diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/eligible_tuition_amount.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml index 25397b109..d217a388c 100644 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -1,12 +1,4 @@ -- name: Manitoba students credit tuition ineligible - period: 2023 - input: - province_code: MB - tuition_expenses: 50 - output: - mb_tuition_amount_credit: 0 - -- name: Manitoba students credit tuition eligible (Full time students) +- name: Manitoba full time students credit period: 2023 input: province_code: MB @@ -15,7 +7,7 @@ output: mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 -- name: Manitoba students credit tuition eligible (Part time students with disabilities) +- name: Manitoba part time disabled students credit period: 2023 input: province_code: MB @@ -25,8 +17,7 @@ output: mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 - -- name: Manitoba students credit tuition eligible (Part time students without disabilities) +- name: Manitoba part time non-disabled students credit period: 2023 input: province_code: MB diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.yaml new file mode 100644 index 000000000..8b3c4ecd6 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.yaml @@ -0,0 +1,15 @@ +- name: Manitoba student with ineligible tuition amount + period: 2023 + input: + province_code: MB + tuition_expenses: 50 + output: + mb_tuition_amount_credit_eligible: 0 + +- name: Manitoba student with eligible tuition amount + period: 2023 + input: + province_code: MB + tuition_expenses: 20_000 + output: + mb_tuition_amount_credit_eligible: 1 diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index ac1b8aff1..4c349615f 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -6,7 +6,7 @@ class mb_tuition_amount_credit(Variable): entity = Person label = "Manitoba tuition amount credit" definition_period = YEAR - defined_for = ProvinceCode.MB + defined_for = "mb_tuition_amount_credit_eligible" def formula(person, period, parameters): p = parameters( @@ -14,7 +14,6 @@ def formula(person, period, parameters): ).gov.provinces.mb.tax.income.credits.tuition_amount tuition = person("tuition_expenses", period) - tuition_eligible = tuition > p.eligible_tuition_amount # check if full-time student full_time = person("is_full_time_student", period) @@ -31,4 +30,4 @@ def formula(person, period, parameters): ], ) - return tuition_eligible * (tuition + tuition_addition) + return tuition + tuition_addition diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py new file mode 100644 index 000000000..73beea1a6 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py @@ -0,0 +1,19 @@ +from policyengine_canada.model_api import * + + +class mb_tuition_amount_credit_eligible(Variable): + value_type = bool + entity = Person + label = "Manitoba tuition amount credit" + definition_period = YEAR + defined_for = ProvinceCode.MB + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.mb.tax.income.credits.tuition_amount + + tuition = person("tuition_expenses", period) + tuition_eligible = tuition > p.tuition_threshold + + return tuition_eligible From 09bbc72f84efeb96b4f343f38fa32f60b4cacb6d Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Wed, 13 Sep 2023 03:13:19 +0000 Subject: [PATCH 22/25] resolve comments --- .../tax/income/credits/tuition_amount/amount/full_time.yaml | 2 +- .../income/credits/tuition_amount/part_time/disabled.yaml | 2 +- .../credits/tuition_amount/part_time/non_disabled.yaml | 2 +- .../income/credits/tuition_amount/tuition_threshold.yaml | 4 ++-- .../credits/tuition_amount/mb_tuition_amount_credit.yaml | 6 +++--- .../tuition_amount/mb_tuition_amount_credit_eligible.py | 4 +--- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml index 3edddbabb..a903c803f 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml @@ -7,5 +7,5 @@ metadata: reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14)(B)(a) href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml index 813a85efe..ff8c235cc 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml @@ -7,5 +7,5 @@ metadata: reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14)(B)(a) href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml index a9f6a945e..84e317441 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml @@ -7,5 +7,5 @@ metadata: reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) + - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14)(B)(b) href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml index 33378e5c9..22fb284ac 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml @@ -7,5 +7,5 @@ metadata: reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14) - href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) + - title: Income Tax Folio S1-F2-C2, Tuition Tax Credit - Educational institutions in Canada, General comments(2.3) + href: https://www.canada.ca/en/revenue-agency/services/tax/technical-information/income-tax/income-tax-folios-index/series-1-individuals/folio-2-students/income-tax-folio-s1-f2-c2-tuition-tax-credit.html#toc4 diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml index d217a388c..3bd460b06 100644 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -1,7 +1,7 @@ - name: Manitoba full time students credit period: 2023 input: - province_code: MB + mb_tuition_amount_credit_eligible: true is_full_time_student: true tuition_expenses: 20_000 output: @@ -10,7 +10,7 @@ - name: Manitoba part time disabled students credit period: 2023 input: - province_code: MB + mb_tuition_amount_credit_eligible: true is_full_time_student: false is_disabled: true tuition_expenses: 20_000 @@ -20,7 +20,7 @@ - name: Manitoba part time non-disabled students credit period: 2023 input: - province_code: MB + mb_tuition_amount_credit_eligible: true is_full_time_student: false is_disabled: false tuition_expenses: 20_000 diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py index 73beea1a6..d953db712 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit_eligible.py @@ -14,6 +14,4 @@ def formula(person, period, parameters): ).gov.provinces.mb.tax.income.credits.tuition_amount tuition = person("tuition_expenses", period) - tuition_eligible = tuition > p.tuition_threshold - - return tuition_eligible + return tuition > p.tuition_threshold From f55f18a81ad30798b8c3350fdc24efa93ff12be0 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:28:40 +0000 Subject: [PATCH 23/25] requested changes fixed --- .../tuition_amount/{ => amount}/part_time/disabled.yaml | 0 .../{ => amount}/part_time/non_disabled.yaml | 0 .../income/credits/tuition_amount/tuition_threshold.yaml | 2 +- .../credits/tuition_amount/mb_tuition_amount_credit.py | 9 +++------ 4 files changed, 4 insertions(+), 7 deletions(-) rename policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/{ => amount}/part_time/disabled.yaml (100%) rename policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/{ => amount}/part_time/non_disabled.yaml (100%) diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/disabled.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/non_disabled.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/part_time/non_disabled.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/non_disabled.yaml diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml index 22fb284ac..7833b4de0 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/tuition_threshold.yaml @@ -1,4 +1,4 @@ -description: Manitoba allows students with tuition above this amount to file for the tuition amount credit. +description: Manitoba limits the tuition amount credit to students who have paid more than this amount of tuition. values: 2022-01-01: 100 metadata: diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index 4c349615f..9e35a6e59 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -22,12 +22,9 @@ def formula(person, period, parameters): disabled = person("is_disabled", period) tuition_addition = select( - [full_time, ~full_time & disabled, ~full_time & ~disabled], - [ - p.amount.full_time, - p.part_time.disabled, - p.part_time.non_disabled, - ], + [full_time, disabled], + [p.amount.full_time, p.amount.part_time.disabled], + default=p.amount.part_time.non_disabled, ) return tuition + tuition_addition From 0136b9685f16e13bcb2a082a9ae11bf091c61e41 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:38:23 +0000 Subject: [PATCH 24/25] fix --- ...full_time.yaml => full_time_or_disabled.yaml} | 4 ++-- .../amount/part_time/disabled.yaml | 11 ----------- .../tuition_amount/mb_tuition_amount_credit.yaml | 10 ---------- .../tuition_amount/mb_tuition_amount_credit.py | 16 ++++++++-------- 4 files changed, 10 insertions(+), 31 deletions(-) rename policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/{full_time.yaml => full_time_or_disabled.yaml} (68%) delete mode 100644 policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time_or_disabled.yaml similarity index 68% rename from policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time_or_disabled.yaml index a903c803f..9aac06e19 100644 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time.yaml +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/full_time_or_disabled.yaml @@ -1,9 +1,9 @@ -description: Manitoba extends this tuition amount to full-time students at educational institutions. +description: Manitoba extends this tuition amount to full-time or disabled part-time students at educational institutions. values: 2022-01-01: 4_800 # 400/month * 12 metadata: unit: currency-CAD - label: Manitoba tuition credit full-time student amount + label: Manitoba tuition credit full-time or disabled part-time student amount reference: - title: Government of Canada - Manitoba Information Guide href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml deleted file mode 100644 index ff8c235cc..000000000 --- a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/tuition_amount/amount/part_time/disabled.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Manitoba extends this tuition amount to disabled part-time students. -values: - 2022-01-01: 4_800 # 400/month * 12 -metadata: - unit: currency-CAD - label: Manitoba tuition credit disabled part-time student amount - reference: - - title: Government of Canada - Manitoba Information Guide - href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 - - title: Government of Canada - Manitoba individual income tax C.C.S.M C.l.10 Division II Section4.6(14)(B)(a) - href: https://web2.gov.mb.ca/laws/statutes/archive/i010(2020-11-05)e.php#4.6(14) diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml index 3bd460b06..a1497fa04 100644 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -7,16 +7,6 @@ output: mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 -- name: Manitoba part time disabled students credit - period: 2023 - input: - mb_tuition_amount_credit_eligible: true - is_full_time_student: false - is_disabled: true - tuition_expenses: 20_000 - output: - mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 - - name: Manitoba part time non-disabled students credit period: 2023 input: diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index 9e35a6e59..0e61c62dd 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -15,16 +15,16 @@ def formula(person, period, parameters): tuition = person("tuition_expenses", period) - # check if full-time student - full_time = person("is_full_time_student", period) + # check if full-time or disabled student + full_time_student = person("is_full_time_student", period) - # check if disabled - disabled = person("is_disabled", period) + disabled_student = person("is_disabled", period) - tuition_addition = select( - [full_time, disabled], - [p.amount.full_time, p.amount.part_time.disabled], - default=p.amount.part_time.non_disabled, + full_time_or_disabled_student = full_time_student | disabled_student + + tuition_addition = ( + full_time_or_disabled_student * p.amount.full_time_or_disabled + + ~full_time_student * p.amount.part_time.non_disabled ) return tuition + tuition_addition From 29657244c82b66abebd080a1f9b20ffed2967942 Mon Sep 17 00:00:00 2001 From: laviniawo <132245041+laviniawo@users.noreply.github.com> Date: Sat, 3 Feb 2024 05:13:49 +0000 Subject: [PATCH 25/25] fixes on rate calculations --- .../credits/tuition_amount/mb_tuition_amount_credit.yaml | 4 ++-- .../credits/tuition_amount/mb_tuition_amount_credit.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml index a1497fa04..5dfdad735 100644 --- a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.yaml @@ -5,7 +5,7 @@ is_full_time_student: true tuition_expenses: 20_000 output: - mb_tuition_amount_credit: 24_800 # 20_000 + 4_800 = 24_800 + mb_tuition_amount_credit: 7_800 # 20_000 * 0.15 + 4_800 = 24_800 - name: Manitoba part time non-disabled students credit period: 2023 @@ -15,4 +15,4 @@ is_disabled: false tuition_expenses: 20_000 output: - mb_tuition_amount_credit: 21_440 # 20_000 + 1_440 = 21_440 + mb_tuition_amount_credit: 4_440 # 20_000 * 0.15 + 1_440 = 21_440 diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py index 0e61c62dd..519c551ba 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/tuition_amount/mb_tuition_amount_credit.py @@ -15,6 +15,12 @@ def formula(person, period, parameters): tuition = person("tuition_expenses", period) + rate = parameters(period).gov.cra.tax.income.income_tax_schedule.rates[ + 0 + ] + + tuition_rate = tuition * rate + # check if full-time or disabled student full_time_student = person("is_full_time_student", period) @@ -27,4 +33,4 @@ def formula(person, period, parameters): + ~full_time_student * p.amount.part_time.non_disabled ) - return tuition + tuition_addition + return tuition_rate + tuition_addition