I've got an e-commerce shop running on mysql 5.0.45.
Prices are stored in the database without tax (now 17.5%). Tax was 15%. The client painstakingly went through and rounded all of their prices so that when tax was at 15%, you'd get a nice round figure eg £10.50, not £10.48. What I want to do is adjust the prices in the database based on the current prices, so that the taxed price is nicely rounded.
As I see it happening:
1) Take current non-taxed price
2) Add tax (multiply by 1.175)
3) Round value up to nearest £0.10
4) Deduct tax from rounded value (divide by 1.175)
5) UPDATE the value
Does this make sense? How can I tackle the rounding?