Hello,
I have some odd behaviour, i have a tax of 21% and a product price of 59,95. But I cannot seem to set this price exactly, it's or 59,96 or 59,94. I think it has to do with using the base price and using that base price as calculation for the final price:
49,55 * 1,21 = 59,9555 = rounded 59,96
if I remove one cent from that:
49,54 * 1,21 = 59,9434 = rounded 59,94
So I cannot seem to get the actual 59,95, I tried checking the database but that is not possible as well. It uses the base price with only 2 decimals to calculate the final price, instead of just ising the cost price with more than 2 decimals to get a more precise calculation. How can I fix this?
calc the cost price!!!
Quote from: GJC Web Design on October 11, 2020, 11:21:44 AM
calc the cost price!!!
Yes I do that, it does not work. It automatically adds 1 cent.
I did some digging, and it seems this new behaviour is added in the new version of Virtuemart, this didn't happen in older versions. Seems to me that a lot of things are buggy right now. I also made another topic regarding coupons where category selection is bugged.
EDIT: Found the solution! There is a configuration at the prices where it can round the prices only on display or not, that was turned off. So it began rounding before the display!
QuoteSo it began rounding before the display!
I may be wrong, but if I turn on this checkbox, all price operations will always be rounded, and then an error of tens of units may occur in the cart.
Quote from: pinochico on October 11, 2020, 14:25:10 PM
QuoteSo it began rounding before the display!
I may be wrong, but if I turn on this checkbox, all price operations will always be rounded, and then an error of tens of units may occur in the cart.
No it never rounds the price operations. When you turn on the checkbox it rounds all price operations. So that is why I couldn't get a certain price.