Fix tax calculation logic and update discount calculation method#6
Open
henryhabib wants to merge 1 commit into
Open
Fix tax calculation logic and update discount calculation method#6henryhabib wants to merge 1 commit into
henryhabib wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request modifies tax and discount calculation logic in a Flask-based personal finance tracker application. The changes aim to adjust tax brackets and implement a new iterative discount calculation method. However, the implementation contains critical bugs that need to be addressed before merging.
Key Changes:
- Modified the lowest tax bracket threshold from $10,000 to $5,000 in the
calculate_taxfunction - Replaced the direct percentage-based discount calculation with an iterative approach in
calculate_discount - Maintained the existing type annotation error in
calculate_taxfunction signature
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request updates the tax calculation and discount logic in the
app.pyfile to improve accuracy and better reflect business requirements.Tax calculation changes:
calculate_tax: The threshold for the lowest tax rate was changed from10000to5000, so incomes up to5000are now taxed at 10%.Discount calculation changes:
calculate_discount: Instead of a direct percentage calculation, the discount is now applied iteratively, reducing the price by 1% for each percentage point in the discount rate.