-
Notifications
You must be signed in to change notification settings - Fork 15
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
Incorrect total price of items in cart #65
Comments
At some places there is float calculation left instead of decimal calculation IIRC. That may cause the difference. Let me take a look |
This is where the data gets prepared for display. https://github.com/bluedynamics/bda.plone.cart/blob/master/src/bda/plone/cart/__init__.py#L138 Here is the actual implementation of cart net and vat https://github.com/bluedynamics/bda.plone.shop/blob/master/src/bda/plone/shop/cartdata.py#L75 i have no time right now to dig deeper, but I fear best would be to write some tests in order to figure out the cause now |
Thanks for the information. Here's an example that might help: Calculation of
Calculation of
Calculation of total price:
After using the Do you have any insight where this can be solved? Let me know if I can be of any help. |
Hi there, Following this we decided to change the validation in order to allow more decimal places to be included in decimal fields. (So you can include more decimals in the item price and avoid this error:
We patch the relevant locales in zope/i18n/locales/data/ Changing the decimal literal validator to allow more decimal places to be added to the net price:
Definitely not the most eloquent of solutions but it does seem to be a workable workaround... |
The total price of items in cart is incorrect while using 21% of VAT.
The image bellow shows an example of the issue (77.99€ instead of 78€) in a fresh Plone installation.
Example:
The net price used for the above items was:
Any ideas what is causing this problem?
The text was updated successfully, but these errors were encountered: