-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
South Carolina retirement deduction & military retirement deduction
Fixes #2926 Co-authored-by: Pinyan <[email protected]>
- Loading branch information
Showing
6 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
.../parameters/gov/states/sc/tax/income/subtractions/retirement_deduction/age_threshold.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,11 @@ | ||
description: South Carolina allows filers above this age to be eligible for the retirement income deduction. | ||
metadata: | ||
unit: year | ||
label: South Carolina retirement income deduction age threshold | ||
reference: | ||
- title: South Carolina State SECTION 12-6-1170(B) | ||
href: https://www.scstatehouse.gov/code/t12c006.php | ||
- title: Instructions for Form SC-1040 (line 3p) | ||
href: https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=18 | ||
values: | ||
2021-01-01: 65 |
11 changes: 11 additions & 0 deletions
11
...s/parameters/gov/states/sc/tax/income/subtractions/retirement_deduction/older_amount.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,11 @@ | ||
description: South Carolina allows a retirement deduction that is capped at this amount. | ||
metadata: | ||
unit: currency-USD | ||
label: South Carolina capped retirement deduction amount | ||
reference: | ||
- title: South Carolina State SECTION 12-6-1170(A)(1) | ||
href: https://www.scstatehouse.gov/code/t12c006.php | ||
- title: Instructions for Form SC-1040 (line 3p) | ||
href: https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=18 | ||
values: | ||
2021-01-01: 10_000 |
11 changes: 11 additions & 0 deletions
11
...parameters/gov/states/sc/tax/income/subtractions/retirement_deduction/younger_amount.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,11 @@ | ||
description: South Carolina allows a retirement deduction that is capped at this amount. | ||
metadata: | ||
unit: currency-USD | ||
label: South Carolina capped retirement deduction younger amount | ||
reference: | ||
- title: South Carolina State SECTION 12-6-1170(A)(1) | ||
href: https://www.scstatehouse.gov/code/t12c006.php | ||
- title: Instructions for Form SC-1040 (line 3p) | ||
href: https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=18 | ||
values: | ||
2021-01-01: 3_000 |
72 changes: 72 additions & 0 deletions
72
...e/gov/states/sc/tax/income/subtractions/retirement_deduction/sc_retirement_deduction.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,72 @@ | ||
- name: Case 1, both head and spouse age higher than 65. | ||
period: 2022 | ||
input: | ||
people: | ||
person1: | ||
taxable_pension_income: 2_000 | ||
military_retirement_pay: 11_000 | ||
age: 70 | ||
is_tax_unit_head: true | ||
person2: | ||
taxable_pension_income: 1_000 | ||
military_retirement_pay: 4_000 | ||
age: 66 | ||
is_tax_unit_spouse: true | ||
tax_units: | ||
tax_unit: | ||
members: [person1, person2] | ||
households: | ||
household: | ||
members: [person1, person2] | ||
state_code: SC | ||
output: | ||
sc_retirement_deduction: 1_000 | ||
|
||
- name: Case 2, both head and spouse age less than 65. | ||
period: 2022 | ||
input: | ||
people: | ||
person1: | ||
taxable_pension_income: 2_000 | ||
military_retirement_pay: 11_000 | ||
age: 54 | ||
is_tax_unit_head: true | ||
person2: | ||
taxable_pension_income: 1_000 | ||
military_retirement_pay: 4_000 | ||
age: 50 | ||
is_tax_unit_spouse: true | ||
tax_units: | ||
tax_unit: | ||
members: [person1, person2] | ||
households: | ||
household: | ||
members: [person1, person2] | ||
state_code: SC | ||
output: | ||
sc_retirement_deduction: 0 | ||
|
||
- name: Case 3, head age higher than 65, spouse age less than 65. | ||
period: 2022 | ||
input: | ||
people: | ||
person1: | ||
taxable_pension_income: 5_000 | ||
military_retirement_pay: 6_000 | ||
age: 70 | ||
is_tax_unit_head: true | ||
person2: | ||
taxable_pension_income: 1_000 | ||
military_retirement_pay: 4_000 | ||
age: 50 | ||
is_tax_unit_spouse: true | ||
tax_units: | ||
tax_unit: | ||
members: [person1, person2] | ||
households: | ||
household: | ||
members: [person1, person2] | ||
state_code: SC | ||
output: | ||
sc_retirement_deduction: 4_000 | ||
|
10 changes: 10 additions & 0 deletions
10
...ome/subtractions/retirement_deduction/sc_military_retirement_income_deduction_survivor.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,10 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class sc_military_retirement_income_deduction_survivor(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "South Carolina military retirement income deduction for survivor" | ||
defined_for = StateCode.SC | ||
unit = USD | ||
definition_period = YEAR |
31 changes: 31 additions & 0 deletions
31
...les/gov/states/sc/tax/income/subtractions/retirement_deduction/sc_retirement_deduction.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,31 @@ | ||
from policyengine_us.model_api import * | ||
|
||
class sc_retirement_deduction(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "South Carolina retirement deduction" | ||
defined_for = StateCode.SC | ||
unit = USD | ||
reference = ("https://www.scstatehouse.gov/code/t12c006.php", #SECTION 12-6-1170(A)(1) | ||
"https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=18" | ||
) | ||
definition_period = YEAR | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.states.sc.tax.income.subtractions.retirement_deduction | ||
person = tax_unit.members | ||
age = person("age", period) | ||
head = person("is_tax_unit_head", period) | ||
spouse = person("is_tax_unit_spouse", period) | ||
head_or_spouse = head | spouse | ||
# line 1 | ||
max_deduction_allowed = where(age >= p.age_threshold, p.older_amount, p.younger_amount) | ||
# line 2 | ||
military_retirement_pay = person("military_retirement_pay", period) | ||
# line 3 | ||
retirement_deduction_available = max_(max_deduction_allowed - military_retirement_pay,0) | ||
# line 4 | ||
retirement_income = person("taxable_pension_income", period) | ||
# line 5 | ||
return tax_unit.sum(min_(retirement_deduction_available, retirement_income)) | ||
|