Skip to content

Fix tax calculation logic and improve discount calculation method#5

Open
henryhabib wants to merge 1 commit into
masterfrom
hh-update-fix-2
Open

Fix tax calculation logic and improve discount calculation method#5
henryhabib wants to merge 1 commit into
masterfrom
hh-update-fix-2

Conversation

@henryhabib
Copy link
Copy Markdown
Owner

This pull request updates the tax calculation and discount logic in app.py to better align with revised business rules. The most important changes are:

Tax calculation adjustments:

  • Changed the lowest income tax bracket threshold in calculate_tax from 10,000 to 5,000, affecting how low-income taxes are computed.

Discount calculation logic:

  • Updated calculate_discount to apply the discount iteratively by subtracting 1% of the price for each percentage point of the discount rate, instead of calculating the discount as a single percentage operation.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request modifies tax and discount calculation logic in app.py for a Flask-based personal finance tracking application. The changes adjust the lowest income tax bracket threshold and introduce an iterative approach to discount calculations. However, the implementation contains critical bugs that need to be addressed before merging.

Key Changes:

  • Modified the lowest income tax bracket threshold from 10,000 to 5,000 in the calculate_tax function
  • Replaced direct percentage-based discount calculation with an iterative approach that applies 1% reductions per discount rate point
  • Updated function logic to align with revised business rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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