spree/spree — Issue #767: Unattainable price
Author: dancinglightning
Created: 2011-11-15 22:00:05+00:00
State: open

With 0.70, in Europe (with vat enabled) there is an issue I call the unattainable price. Best by example:

- we have 23% vat
- we want to sell a table for 1850 Euros

So I input the 1850 ito the tax-inclusuve field. It works out to 1504.07 before tax and spree saves that.

It comes back as 1850.01 Euros

To remove doubts I'll say the obvious: this is an unacceptable price. So I need to change the price, also not good but better.
I try 1849.95 (1504.02) which comes back as 1849.94 and so it goes on and on.

This is no small issue, about 5% of our products are affected and the larger the price, the further one has to deviate to find an acceptable one.

This is not good and is mainly due to the way spree models tax. Instead of having an option to have tax reverse-calculated, it enforces no-tax prices in the db. But with that option one would need at least three digets in the db to achieve any price. Three and four digits are quite common nowadays in Europe (rounded in user-view off course, but on bills etc one sees them)