Jacek Es Posted October 31 Share Posted October 31 Hi, I have discovered this on PrestaShop 8.1.7. It applies to rounding methods: Round on each line and Round on total when currency Decimals is set to 2. PrestaShop 8.1 rounds Unit Price with discount applied value but uses unrounded value for further calculations. This makes the calculations appear wrong. Example: Product base price: £0.30 Discount from 1000pcs: 31% Product price with discount applied: £0.207 (rounded to £0.21) PrestaShop makes the following calculations: £0.21 * 1000 cannot be £207.00 The problem is that rounded Unit Price with discount is displayed (£0.21) but unrounded value is taken to the calculations (£0.207). Possible approaches to correct this: 1. Display rounded value and use it for further calculations (as it was in PrestaShop 1.6): £0.21 * 1000 = £210.00 2. Display unrounded value and use it for further calculations (but the shop is set to 2 Decimals which is an issue): £0.207 * 1000 = £207.00 How to fix this? Thanks Link to comment Share on other sites More sharing options...
Nickz Posted October 31 Share Posted October 31 (edited) I think that is on purpose, as it makes no sense to use a rounded price in invoices and payments. Edited October 31 by Nickz (see edit history) Link to comment Share on other sites More sharing options...
Jacek Es Posted October 31 Author Share Posted October 31 There would be a sense to it - to have calculations on the invoice and during checkout process that are mathematically correct. You cannot have the following: £0.21 * 1000 = £207.00 You can either have: £0.21 * 1000 = £210.00 or £0.207 * 1000 = £207.00 Don't you agree? In PrestaShop 1.6 with Classical rounding mode the calculations were made correct - the rounded value was displayed and used for the calculations: Link to comment Share on other sites More sharing options...
Nickz Posted October 31 Share Posted October 31 10 minutes ago, Jacek Es said: in PrestaShop 1.6 with Classical rounding mode the calculations were made correct - if you like the way Prestashop 1.6 handled the issue, then use 1.6. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now