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

Unit price tax calculation bug #751

Open
karashiiro opened this issue Jun 18, 2022 · 0 comments
Open

Unit price tax calculation bug #751

karashiiro opened this issue Jun 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@karashiiro
Copy link
Member

Currently, both the unit price and the total are presented in the API with the 5% sales tax precalculated. However, the formula for calculating the new values (ceil(x * 1.05)) loses information, which can, for some values, cause the taxed unit price times the quantity to not equal the taxed total price.

Fixing this would require changing the interface of the current API versions to allow the unit price to be a floating-point number, which would break existing projects written in statically-typed languages. This should therefore be fixed in the V3 API.

@karashiiro karashiiro added the bug Something isn't working label Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
1 participant