forked from PolicyEngine/policyengine-us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
98 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 20 additions & 19 deletions
39
policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing_credit/rate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
description: Ohio provides the joint filing credit for this fraction of redunfable credit, based on Ohio modified adjuested gross income less exemptions. | ||
description: Ohio provides a joint filing credit for this fraction corresponds with the taxpayer's modified adjusted gross income, less exemptions for the taxable year, of the Tax less credits. | ||
metadata: | ||
type: single_amount | ||
threshold_unit: currency-USD | ||
amount_unit: /1 | ||
label: Ohio joint filing credit threshold | ||
label: Ohio joint filing credit income threshold | ||
reference: | ||
- title: 2021 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 | ||
href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20 | ||
- title: 2022 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 | ||
href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/it1040-sd100-instruction-booklet.pdf#page=20 | ||
- title: Ohio Revised Code - Section 5747.05 Tax credits. (E) | ||
- title: Ohio Revised Code - Section 5747.05 Tax credits. (E) | ||
href: https://codes.ohio.gov/ohio-revised-code/section-5747.05 | ||
|
||
brackets: | ||
- threshold: | ||
2021-01-01: 0 | ||
amount: | ||
2021-01-01: 0.2 | ||
- threshold: | ||
2021-01-01: 25_000 | ||
amount: | ||
2021-01-01: 0.15 | ||
- threshold: | ||
2021-01-01: 50_000 | ||
amount: | ||
2021-01-01: 0.10 | ||
- threshold: | ||
2021-01-01: 75_000 | ||
amount: | ||
2021-01-01: 0.05 | ||
- threshild: | ||
2021-01-01: 0 | ||
amount: | ||
2021-01-01: 0.2 | ||
- threshild: | ||
2021-01-01: 25_000 | ||
amount: | ||
2021-01-01: 0.15 | ||
- threshild: | ||
2021-01-01: 50_000 | ||
amount: | ||
2021-01-01: 0.1 | ||
- threshild: | ||
2021-01-01: 75_000 | ||
amount: | ||
2021-01-01: 0.05 | ||
|
||
|
35 changes: 35 additions & 0 deletions
35
...baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
- name: Eligible for joint filing credit | ||
absolute_error_margin: 0.01 | ||
period: 2021 | ||
input: | ||
state_code: OH | ||
oh_joint_filing_credit: true | ||
oh_agi: 47_000 | ||
oh_income_tax_exempt: 10_000 | ||
oh_income_tax_before_refundable_credits: 4_000 | ||
output: | ||
oh_joint_filing_credit: 600 | ||
|
||
- name: Eligible for maximum joint filing credit | ||
absolute_error_margin: 0.01 | ||
period: 2021 | ||
input: | ||
state_code: OH | ||
oh_joint_filing_credit: true | ||
oh_agi: 47_000 | ||
oh_income_tax_exempt: 10_000 | ||
oh_income_tax_before_refundable_credits: 6_000 | ||
output: | ||
oh_joint_filing_credit: 650 | ||
|
||
- name: Not eligible for joint filing credit | ||
absolute_error_margin: 0.01 | ||
period: 2021 | ||
input: | ||
state_code: OH | ||
oh_joint_filing_credit: false | ||
oh_agi: 47_000 | ||
oh_income_tax_exempt: 10_000 | ||
oh_income_tax_before_refundable_credits: 4_000 | ||
output: | ||
oh_joint_filing_credit: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.../variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class oh_joint_filing_credit(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "Ohio Joint Filing Credit" | ||
unit = USD | ||
definition_period = YEAR | ||
reference = "https://codes.ohio.gov/ohio-revised-code/section-5747.05" | ||
defined_for = "oh_joint_filing_credit_eligible" | ||
|
||
def formula(tax_unit, period, parameters): | ||
credit = tax_unit("oh_income_tax_before_refundable_credits", period) | ||
p = parameters( | ||
period | ||
).gov.states.oh.tax.income.credits.joint_filing_credit | ||
magi_less_exepmtion = tax_unit("oh_agi", period) - tax_unit( | ||
"oh_income_tax_exempt", period | ||
) | ||
percentage = p.rate.calc(magi_less_exepmtion) | ||
return min_(credit * percentage, p.max_amount) |
21 changes: 5 additions & 16 deletions
21
.../income/credits/oh_joint_filing_credit.py → ...credit/oh_joint_filing_credit_eligible.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class oh_joint_filing_credit(Variable): | ||
class oh_joint_filing_credit_eligible(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "Ohio Joint Filing Credit" | ||
unit = USD | ||
label = "Eligible for Ohio Joint Filing Credit" | ||
definition_period = YEAR | ||
reference = "https://codes.ohio.gov/ohio-revised-code/section-5747.05" | ||
defined_for = StateCode.OH | ||
|
||
def formula(tax_unit, period, parameters): | ||
filing_status = tax_unit("filing_status", period) | ||
credit = tax_unit("oh_income_tax_before_refundable_credits", period) | ||
person = tax_unit.members | ||
is_head = person("is_tax_unit_head", period) | ||
is_spouse = person("is_tax_unit_spouse", period) | ||
p = parameters( | ||
period | ||
).gov.states.oh.tax.income.credits.joint_filing_credit | ||
income = person("employment_income", period) | ||
print(income) | ||
# income_condition = income >= p.income_base | ||
|
||
head_income = tax_unit.sum(is_head * income) | ||
|
||
spouse_income = tax_unit.sum(is_spouse * income) | ||
|
||
qualify_income = (head_income >= p.income_base) & ( | ||
spouse_income >= p.income_base | ||
) | ||
print(qualify_income) | ||
qualify_status = filing_status == filing_status.possible_values.JOINT | ||
magi_less_exepmtion = tax_unit("oh_agi", period) - tax_unit( | ||
"oh_income_tax_exempt", period | ||
) | ||
percentage = where( | ||
qualify_income & qualify_status, | ||
p.rate.calc(magi_less_exepmtion), | ||
0, | ||
) | ||
return min_(credit * percentage, p.max_amount) | ||
|
||
return qualify_income & qualify_status |