{"issue":{"state":"open","created_at":"2011-11-15T22:00:05Z","updated_at":"2011-11-24T03:36:39Z","comments":14,"user":{"gravatar_id":"4cf647ed8f35defeed6cc04a35889feb","id":142157,"url":"https://api.github.com/users/dancinglightning","login":"dancinglightning","avatar_url":"https://secure.gravatar.com/avatar/4cf647ed8f35defeed6cc04a35889feb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"With 0.70, in Europe (with vat enabled) there is an issue I call the unattainable price. Best by example:\r\n\r\n- we have 23% vat\r\n- we want to sell a table for 1850 Euros\r\n\r\nSo I input the 1850 ito the tax-inclusuve field. It works out to 1504.07 before tax and spree saves that.\r\n\r\nIt comes back as 1850.01 Euros\r\n\r\nTo remove doubts I'll say the obvious: this is an unacceptable price. So I need to change the price, also not good but better.\r\nI try 1849.95 (1504.02) which comes back as 1849.94 and so it goes on and on.\r\n\r\nThis 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.\r\n\r\nThis 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)\r\n","assignee":{"gravatar_id":"9a2a53db8e9b4476038c94a64b32833f","id":2687,"url":"https://api.github.com/users/radar","login":"radar","avatar_url":"https://secure.gravatar.com/avatar/9a2a53db8e9b4476038c94a64b32833f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2249882,"number":767,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Unattainable price","closed_at":null,"html_url":"https://github.com/spree/spree/issues/767","milestone":{"state":"open","created_at":"2011-11-14T21:28:47Z","due_on":null,"closed_issues":0,"creator":{"gravatar_id":"9a2a53db8e9b4476038c94a64b32833f","id":2687,"url":"https://api.github.com/users/radar","login":"radar","avatar_url":"https://secure.gravatar.com/avatar/9a2a53db8e9b4476038c94a64b32833f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":2,"description":"This is the next release of Spree, containing the namespace changes and bug fixes.","title":"v1.0.0","url":"https://api.github.com/repos/spree/spree/milestones/2","open_issues":4},"url":"https://api.github.com/repos/spree/spree/issues/767"},"action":"created","comment":{"created_at":"2011-11-24T03:36:39Z","updated_at":"2011-11-24T03:36:39Z","user":{"gravatar_id":"9a2a53db8e9b4476038c94a64b32833f","id":2687,"url":"https://api.github.com/users/radar","login":"radar","avatar_url":"https://secure.gravatar.com/avatar/9a2a53db8e9b4476038c94a64b32833f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Actually, there's more to this story :) Math is fun!\r\n\r\n    1504.07 + 1504.07 * 0.23 = 1850.0061.\r\n\r\nUsing the rounding that we currently have in `calculator/vat`, this results in `1850.01`, which (logically) is correct. But you're saying it's not. You live in the country and therefore your logic is more superior to my logic.\r\n\r\nWould you say that if a price were even something like `£1850.00999999` then that should still only be `£1850.00`?\r\n","id":2857965,"url":"https://api.github.com/repos/spree/spree/issues/comments/2857965"}}