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.
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.