Skip to content
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

Optional Sales Tax #5370

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

liwenxin491
Copy link
Collaborator

2023 Optional sales tax tables

@PavelMakarchuk PavelMakarchuk changed the title Liwenxin491/issue5158 2023 Optional sales tax tables Nov 26, 2024
@liwenxin491 liwenxin491 changed the title 2023 Optional sales tax tables Optional Sales Tax/#issue5158 Nov 26, 2024
@liwenxin491 liwenxin491 changed the title Optional Sales Tax/#issue5158 Optional Sales Tax/#5158 Nov 26, 2024
@liwenxin491 liwenxin491 changed the title Optional Sales Tax/#5158 Optional Sales Tax/#[5158] Nov 26, 2024
@liwenxin491 liwenxin491 changed the title Optional Sales Tax/#[5158] Optional Sales Tax Nov 26, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum should just determine which income bracket (1 through 19) the household is in

If income is 0 to 20,000 -> 1
if income is 20,001 to 40,000 -> 2

Etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual sales tax value is determined separately in a different file

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the exact same format from filing_status.py

Or from any other value_type = Enum

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we write a unit test?



class StateSalesTax(Enum):
1 = "0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1 = "0"
Zero = "ZERO"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and others

from policyengine_us.model_api import *


class StateSalesTax(Enum):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class StateSalesTax(Enum):
class StateSalesTaxIncomeBracket(Enum):

18 = "275000"
19 = "300000"

class state_sales_tax(Variable):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class state_sales_tax(Variable):
class state_sales_tax_income_bracket(Variable):

class state_sales_tax(Variable):
value_type = Enum
entity = SPMUnit
possible_values = StateSalesTax
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
possible_values = StateSalesTax
possible_values = StateSalesTaxIncomeBracket

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants