{"action":"created","issue":{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3165","labels_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3165/labels{/name}","comments_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3165/comments","events_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3165/events","html_url":"https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/3165","id":58232364,"number":3165,"title":"Checkout calculation error when using discount and prices include taxes","user":{"login":"garubi","id":10868669,"avatar_url":"https://avatars.githubusercontent.com/u/10868669?v=3","gravatar_id":"","url":"https://api.github.com/users/garubi","html_url":"https://github.com/garubi","followers_url":"https://api.github.com/users/garubi/followers","following_url":"https://api.github.com/users/garubi/following{/other_user}","gists_url":"https://api.github.com/users/garubi/gists{/gist_id}","starred_url":"https://api.github.com/users/garubi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garubi/subscriptions","organizations_url":"https://api.github.com/users/garubi/orgs","repos_url":"https://api.github.com/users/garubi/repos","events_url":"https://api.github.com/users/garubi/events{/privacy}","received_events_url":"https://api.github.com/users/garubi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/labels/Taxes","name":"Taxes","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T16:35:17Z","updated_at":"2015-02-20T09:46:07Z","closed_at":null,"body":"On EDD 2.2.8 configured with taxes as follows:\r\n![taxes-config](https://cloud.githubusercontent.com/assets/10868669/6270190/71ecc2ec-b858-11e4-9064-f4162a66720e.png)\r\nI apply a discount code at the checkout (for semplicity let sey -50%)\r\n\r\nThe total and the tax value is ok but the subtotal is wrong (so, really, it's just a display problem, it doesn't affect the amount payed on the purchase).\r\n\r\nSee this commented screenshot, it better than my english ;-)\r\n![checkout3](https://cloud.githubusercontent.com/assets/10868669/6270753/569cfb70-b85c-11e4-9c78-2cbfed553f2f.png)\r\n\r\nI started working on edd_get_cart_content_details() \r\nwhere I see that most of the calculation are done but I can't get it sorted: When I fix the subtotal issue that I get errors on the Total...\r\n"},"comment":{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/comments/75212638","html_url":"https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/3165#issuecomment-75212638","issue_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3165","id":75212638,"user":{"login":"garubi","id":10868669,"avatar_url":"https://avatars.githubusercontent.com/u/10868669?v=3","gravatar_id":"","url":"https://api.github.com/users/garubi","html_url":"https://github.com/garubi","followers_url":"https://api.github.com/users/garubi/followers","following_url":"https://api.github.com/users/garubi/following{/other_user}","gists_url":"https://api.github.com/users/garubi/gists{/gist_id}","starred_url":"https://api.github.com/users/garubi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garubi/subscriptions","organizations_url":"https://api.github.com/users/garubi/orgs","repos_url":"https://api.github.com/users/garubi/repos","events_url":"https://api.github.com/users/garubi/events{/privacy}","received_events_url":"https://api.github.com/users/garubi/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T09:46:07Z","updated_at":"2015-02-20T09:46:07Z","body":"The error IMHO is that the tax 9.02 is the 22% of €50: the discounted price.\r\nSo in Subtotal EDD is subtracting from the full price the tax calculated on the discounted price.\r\n\r\nTo me the correct subtotal should be €100 - €18,03 (22% of the full price)\r\nthen we apply the discount\r\nthen we show the tax on the discount price\r\nthen the total\r\n\r\nwhat do you think?\r\n\r\n"}}