News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[Solved]Difference showing Baseprice + tax and the Final salesprice

Started by ptrouw, August 29, 2016, 14:12:13 PM

Previous topic - Next topic

ptrouw

I am displaying the "old price" and overwrite price. Old price is crossed. So far all fine. But in some cases some products without overwrite price will also show the crossed old price (Baseprice + tax) and the Final Salesprice, although they are the same. This is incorrect.
This unwanted behaviour is caused by rounding the 6 decimal before and after tax calculations. VM noticed then a difference between Baseprice + tax and the Final salesprice of 0.00001 difference and is showing both, with the Baseprice + tax crossed.
Let me explain you how VM comes to this.
I have a Final price of EUR 82.00, and use Calculate the cost price. Cost price = 67.76860. If you just use Save and Close no problem. But if you do only a Save, the Final Price is changed to 82.00001 because of the tax rule.
I don't know why it is changing back Final price, but this .00001 is due to the tax 21% rule on top of the Cost Price, so: 67.76860  + 14.231406 = 82.000006 which is rounded and the new Final price is now 82.00001.
This is of course different than Baseprice + Tax and now it shows the crossed out price to the customer.

Anybody has any idea how to solve this?

J3.6.2 and VM3.0.16


Milbo

You should not set the tax rules per product, let the system handle it. as far as I know, we use a round in the layout, so your described problem isnt any.
it makes also no difference if you use "save" or "save and close". The final price is always calculated
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ptrouw

Hey Max,

It has to do with the safe and calculate cost price I think. Look at the two new screenshots. One before safe with Final price 85.00000 and no specific product tax rate. After safe I am getting cost price and new rounded final price of 82.00001.
Which is not shown on the front-end of course, but it triggers the crossed base price en final price difference in the front-end.
Could You have a second look?

Milbo

because VM stores the product price and calculates the final price. As I said, imho we use rounding in the layout to check that, maybe you are using an old override.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ptrouw

Yes Max, your a right again :). It was an overwrite with a round on baseprice. Keep on the good work! Thx

Milbo

yeh, thank you. Please test our better work vm3.0.17.6, ahh nevermind. Hopefully we release tomorrow the superb vm3.0.18. We are just working on the new fullinstaller with j3 template
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/