-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
South Carolina sales tax cut for people age 85 and older #5428
Draft
shuyu7zhan
wants to merge
7
commits into
PolicyEngine:master
Choose a base branch
from
shuyu7zhan:shuyu7zhan/issue5387
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+134
−10
Draft
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
39ad0e5
South Carolina sales tax cut for people age 85 and older
shuyu7zhan 2b9a4ab
South Carolina sales tax cut for people age 85 and older
shuyu7zhan fc3800b
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
shuyu7zhan 66d3e43
South Carolina sales tax cut for people age 85 and older
shuyu7zhan 265855a
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
shuyu7zhan 60483a4
SC modify
shuyu7zhan 7c7f2ba
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
shuyu7zhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- South Carolina sales and use tax, general and elderly. |
11 changes: 11 additions & 0 deletions
11
policyengine_us/parameters/gov/states/sc/tax/sales_and_use/exclusion/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 provides a lower state sales and use tax rate for filers of this age and older. | ||
values: | ||
2021-01-01: 85 | ||
|
||
metadata: | ||
unit: year | ||
period: year | ||
label: South Carolina sales and use tax exclusion age threshold | ||
reference: | ||
- title: SC REVENUE RULING 08-5 | ||
href: https://dor.sc.gov/resources-site/lawandpolicy/Advisory%20Opinions/RR08-5.pdf#page=2 | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
10 changes: 10 additions & 0 deletions
10
policyengine_us/parameters/gov/states/sc/tax/sales_and_use/exclusion/percentage.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,10 @@ | ||
description: South Carolina excludes the following percentage of the sales and use tax for elderly filers. | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
metadata: | ||
unit: /1 | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
label: South Carolina sales and use tax senior exclusion percentage | ||
reference: | ||
- title: SC REVENUE RULING 08-5 | ||
href: https://dor.sc.gov/resources-site/lawandpolicy/Advisory%20Opinions/RR08-5.pdf#page=2 | ||
|
||
values: | ||
2021-01-01: 0.01 |
10 changes: 10 additions & 0 deletions
10
policyengine_us/parameters/gov/states/sc/tax/sales_and_use/general.yaml
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
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 @@ | ||
description: South Carolina imposes a general sales and use tax rate of this amount. | ||
metadata: | ||
unit: /1 | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
label: South Carolina general sales and use tax | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
reference: | ||
- title: SC REVENUE RULING 08-5 | ||
href: https://dor.sc.gov/resources-site/lawandpolicy/Advisory%20Opinions/RR08-5.pdf#page=1 | ||
|
||
values: | ||
2021-01-01: 0.06 |
15 changes: 15 additions & 0 deletions
15
.../policy/baseline/gov/states/sc/tax/sales_and_use/sc_sales_and_use_exclusion_eligible.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,15 @@ | ||
- name: Person age 85 or above eligible for tax exclusion | ||
period: 2022 | ||
input: | ||
age: 90 | ||
state_code: SC | ||
output: | ||
sc_sales_and_use_exclusion_eligible: true | ||
|
||
- name: Person age under 85 not eligible for tax exclusion | ||
period: 2022 | ||
input: | ||
age: 70 | ||
state_code: SC | ||
output: | ||
sc_sales_and_use_exclusion_eligible: false |
17 changes: 17 additions & 0 deletions
17
...engine_us/tests/policy/baseline/gov/states/sc/tax/sales_and_use/sc_sales_and_use_tax.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,17 @@ | ||
- name: Person age 85 or above eligible for tax exclusion | ||
period: 2022 | ||
input: | ||
sc_sales_and_use_exclusion_eligible: true | ||
sc_sales_and_purchases_proceeds: 10_000 | ||
state_code: SC | ||
output: | ||
sc_sales_and_use_tax: 500 | ||
|
||
- name: Person age under 85 not eligible for tax exclusion | ||
period: 2022 | ||
input: | ||
sc_sales_and_use_exclusion_eligible: false | ||
sc_sales_and_purchases_proceeds: 10_000 | ||
state_code: SC | ||
output: | ||
sc_sales_and_use_tax: 600 |
9 changes: 9 additions & 0 deletions
9
policyengine_us/variables/gov/states/sc/tax/sales_and_use/sc_sales_and_purchases_proceeds.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,9 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class sc_sales_and_purchases_proceeds(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
label = "South Carolina sales and purchases proceeds" | ||
unit = USD | ||
definition_period = YEAR |
17 changes: 17 additions & 0 deletions
17
...ngine_us/variables/gov/states/sc/tax/sales_and_use/sc_sales_and_use_exclusion_eligible.py
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this apply to the whole unit? For example, if there are two people in the tax unit and only one is 85 or over, does the exclusion apply only to that person's portion of purchase proceeds or is it the whole? |
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,17 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class sc_sales_and_use_exclusion_eligible(Variable): | ||
value_type = bool | ||
entity = TaxUnit | ||
label = "Eligible for South Carolina sales and use tax senior exclusion" | ||
definition_period = YEAR | ||
reference = "https://dor.sc.gov/resources-site/lawandpolicy/Advisory%20Opinions/RR08-5.pdf#page=2" | ||
defined_for = StateCode.SC | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.states.sc.tax.sales_and_use.exclusion | ||
person = tax_unit.members | ||
age = person("age", period) | ||
age_eligible = age >= p.age_threshold | ||
return age_eligible |
27 changes: 27 additions & 0 deletions
27
policyengine_us/variables/gov/states/sc/tax/sales_and_use/sc_sales_and_use_tax.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,27 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class sc_sales_and_use_tax(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "South Carolina sales and use tax" | ||
unit = USD | ||
reference = "https://dor.sc.gov/forms-site/Forms/ST3.pdf#page=2" | ||
definition_period = YEAR | ||
defined_for = StateCode.SC | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.states.sc.tax.sales_and_use | ||
|
||
# base amount | ||
taxable_sales_and_purchases = tax_unit( | ||
"sc_sales_and_purchases_proceeds", period | ||
) | ||
|
||
# sales and use tax rate with eligible exclusion | ||
eligible = tax_unit("sc_sales_and_use_exclusion_eligible", period) | ||
exclusion = p.exclusion.percentage * eligible | ||
rate_applied = p.general - exclusion | ||
shuyu7zhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# return base amount * rate_applied | ||
return taxable_sales_and_purchases * rate_applied |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a good start, we will need to add the general SC use / Sales tax structure as well.