{"action":"created","issue":{"url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/344","repository_url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart","labels_url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/344/comments","events_url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/344/events","html_url":"https://github.com/Crinsane/LaravelShoppingcart/issues/344","id":235521338,"node_id":"MDU6SXNzdWUyMzU1MjEzMzg=","number":344,"title":"Total price calculation is wrong","user":{"login":"htulibacki","id":969692,"node_id":"MDQ6VXNlcjk2OTY5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/969692?v=4","gravatar_id":"","url":"https://api.github.com/users/htulibacki","html_url":"https://github.com/htulibacki","followers_url":"https://api.github.com/users/htulibacki/followers","following_url":"https://api.github.com/users/htulibacki/following{/other_user}","gists_url":"https://api.github.com/users/htulibacki/gists{/gist_id}","starred_url":"https://api.github.com/users/htulibacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htulibacki/subscriptions","organizations_url":"https://api.github.com/users/htulibacki/orgs","repos_url":"https://api.github.com/users/htulibacki/repos","events_url":"https://api.github.com/users/htulibacki/events{/privacy}","received_events_url":"https://api.github.com/users/htulibacki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-13T11:24:49Z","updated_at":"2018-10-04T22:09:26Z","closed_at":null,"author_association":"NONE","body":"It is not a good idea to round price with tax after summing it, becouse this could give you a wrong result. For example:\r\n\r\nProduct price | Tax | Product Price With Tax | Qty | Product Total\r\n---------------|------|-------------------------|------|----------------\r\n48.7               | 23% | 59.901                         | 3      | **179.703**\r\n40,57             | 23% | 49.9011                       | 5      | **249.5055**\r\n44.63             | 23% | 54.8949                       | 1      | **54.8949**\r\n**-**              | **-** | **-**                           | **-** | **484.1034**\r\n\r\nWhen you round the total price to two digits, it will give you 484.10, and that is ok.\r\n\r\nBut in your store you want to present clients prices rounded to two digits, and the above table will look like this:\r\n\r\nProduct price | Tax | Product Price With Tax | Qty | Product Total\r\n---------------|------|-------------------------|------|----------------\r\n48.7               | 23% | 59.90                           | 3      | **179.7**\r\n40,57             | 23% | 49.90                           | 5      | **249.5**\r\n44.63             | 23% | 54.89                           | 1      | **54.89**\r\n**-**              | **-** | **-**                           | **-** | **484.09**\r\n\r\nAs you can see, the total price differs by 0.01, and there is no way to get the correct result.\r\n\r\nNevertheless, thank you for all your hard work, and i hope you will find a way to correct this soon :)"},"comment":{"url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/comments/427185797","html_url":"https://github.com/Crinsane/LaravelShoppingcart/issues/344#issuecomment-427185797","issue_url":"https://api.github.com/repos/Crinsane/LaravelShoppingcart/issues/344","id":427185797,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE4NTc5Nw==","user":{"login":"olimortimer","id":1190115,"node_id":"MDQ6VXNlcjExOTAxMTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1190115?v=4","gravatar_id":"","url":"https://api.github.com/users/olimortimer","html_url":"https://github.com/olimortimer","followers_url":"https://api.github.com/users/olimortimer/followers","following_url":"https://api.github.com/users/olimortimer/following{/other_user}","gists_url":"https://api.github.com/users/olimortimer/gists{/gist_id}","starred_url":"https://api.github.com/users/olimortimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimortimer/subscriptions","organizations_url":"https://api.github.com/users/olimortimer/orgs","repos_url":"https://api.github.com/users/olimortimer/repos","events_url":"https://api.github.com/users/olimortimer/events{/privacy}","received_events_url":"https://api.github.com/users/olimortimer/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T22:09:26Z","updated_at":"2018-10-04T22:09:26Z","author_association":"NONE","body":"This really needs to be merged..."}}
{"actor":{"display_login":"olimortimer"}}