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

fix: negative prices with taxes #37

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jpinho
Copy link
Member

@jpinho jpinho commented Sep 7, 2023

So far, when dealing with negative prices we have been computing a negative tax amount as well, which is a bug.

Users typically use negative prices as a simple way to add discounts as line items, and due to misconfiguration or migration purposes, users sometimes end up with a tax rate attached to the discount as well.

It's fine to deduct the tax rate from the price if the price includes tax, but consider a negative tax on the Items computed is wrong bcoz a negative price is never a service or good, and adding a negative price to the Items means we will "reduce" the amount of tax the user is required to pay.

Copy link
Contributor

@josecarneiro josecarneiro left a comment

Choose a reason for hiding this comment

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

Approved

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