Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinuing committed Jul 31, 2023
1 parent 85307ec commit 1ba903e
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Quebec Amount for Dependants and Amount Transferred by a Child Pursuing Studies.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Quebec limits its amount for dependants for child under this age enrolled in post-secondary studies.
values:
2022-01-01: 18
metadata:
unit: year
label: Quebec amount for child enrolled in post-secondary studies age eligibility
reference:
- title: Revenu Quebec - Amount for dependants and amount transferred by a child 18 or over enrolled in post-secondary studies (Line 367)
href: https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/how-to-complete-your-income-tax-return/line-by-line-help/350-to-398-1-non-refundable-tax-credits/line-367/
- title: Schedule A - Amount for Dependants and Amount Transferred by a Child Pursuing Studies
href: https://www.revenuquebec.ca/documents/en/formulaires/tp/2022-12/TP-1.D.A-V%282022-12%29.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Quebec limits this amount for a child under 18 enrolled in post-secondary studies for each completed term
values:
2022-01-01: 3_101
metadata:
unit: currency-CAD
label: Quebec post-secondary studies termly
reference:
- title: Revenu Quebec - Amount for dependants and amount transferred by a child 18 or over enrolled in post-secondary studies (Line 367)
href: https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/how-to-complete-your-income-tax-return/line-by-line-help/350-to-398-1-non-refundable-tax-credits/line-367/
- title: Schedule A - Amount for Dependants and Amount Transferred by a Child Pursuing Studies
href: https://www.revenuquebec.ca/documents/en/formulaires/tp/2022-12/TP-1.D.A-V%282022-12%29.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Quebec provides this base amount transferred by a child enrolled in post-secondary studies for parents.
values:
2022-01-01: 4_879
metadata:
unit: currency-CAD
label: Quebec post-secondary studies transfered base amount
reference:
- title: Revenu Quebec - Amount for dependants and amount transferred by a child 18 or over enrolled in post-secondary studies (Line 367)
href: https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/how-to-complete-your-income-tax-return/line-by-line-help/350-to-398-1-non-refundable-tax-credits/line-367/
- title: Schedule S – Amount Transferred by a Child 18 or Over Enrolled in Post-Secondary Studies
href: https://www.revenuquebec.ca/documents/en/formulaires/tp/2022-12/TP-1.D.S-V%282022-12%29.pdf
- title: Schedule A - Amount for Dependants and Amount Transferred by a Child Pursuing Studies
href: https://www.revenuquebec.ca/documents/en/formulaires/tp/2022-12/TP-1.D.A-V%282022-12%29.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from policyengine_canada.model_api import *


class qc_post_secondary_studies_amount(Variable):
value_type = float
entity = Person
label = (
"Quebec amount for a child under 18 enrolled in post-secondary studies"
)
definition_period = YEAR
defined_for = ProvinceCode.QC

def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.qc.tax.income.credits.depedant_amount

# Child under 18 enrolled in post-secondary studies
age_eligible = person("age", period) < p.age_eligibility
full_time_student = person("is_full_time_student", period)
unmarried = ~person("has_spouse", period)

eligible = age_eligible & full_time_student & unmarried

# Dependent child’s income
net_income = person("individual_net_income", period)
# TODO: add remote deduction line 236
other_income = person("qc_other_income", period)
income = max_(0, net_income - other_income) # +remote deduction

return max_(
0, p.post_secondary_studies_amount - income
) # TODO: check per term
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from policyengine_canada.model_api import *


class qc_post_secondary_studies_transferred_amount(Variable):
value_type = float
entity = Person
label = "Quebec amount transferred by a child enrolled in post-secondary studies"
definition_period = YEAR
defined_for = ProvinceCode.QC

def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.qc.tax.income.credits.depedant_amount

# Child over 18 enrolled in post-secondary studies
age_eligible = person("age", period) < p.age_eligibility
full_time_student = person("is_full_time_student", period)
eligible = age_eligible & full_time_student

# Amount that you can transfer
base_amount = p.post_secondary_studies_transferred_amount
post_secondary_studies_amount = person(
"qc_post_secondary_studies_amount", period
)

# TODO: REDUCTION line 8-16
# https://www.revenuquebec.ca/documents/en/formulaires/tp/2022-12/TP-1.D.S-V%282022-12%29.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from policyengine_canada.model_api import *


class qc_other_income(Variable):
value_type = float
entity = Person
label = "Quebec other income"
unit = CAD
definition_period = YEAR
reference = "https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/how-to-complete-your-income-tax-return/line-by-line-help/96-to-164-total-income/line-154/"
defined_for = ProvinceCode.QC
8 changes: 8 additions & 0 deletions policyengine_canada/variables/household/person/has_spouse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from policyengine_canada.model_api import *


class has_spouse(Variable):
value_type = bool
entity = Person
label = "The individual is married"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from policyengine_canada.model_api import *


class is_full_time_student(Variable):
value_type = bool
entity = Person
label = "Is a full-time student"
definition_period = YEAR

0 comments on commit 1ba903e

Please sign in to comment.