{"action":"created","issue":{"url":"https://api.github.com/repos/mirumee/saleor/issues/1929","repository_url":"https://api.github.com/repos/mirumee/saleor","labels_url":"https://api.github.com/repos/mirumee/saleor/issues/1929/labels{/name}","comments_url":"https://api.github.com/repos/mirumee/saleor/issues/1929/comments","events_url":"https://api.github.com/repos/mirumee/saleor/issues/1929/events","html_url":"https://github.com/mirumee/saleor/pull/1929","id":305647770,"number":1929,"title":"Enable VAT","user":{"login":"rafalp","id":750553,"avatar_url":"https://avatars1.githubusercontent.com/u/750553?v=4","gravatar_id":"","url":"https://api.github.com/users/rafalp","html_url":"https://github.com/rafalp","followers_url":"https://api.github.com/users/rafalp/followers","following_url":"https://api.github.com/users/rafalp/following{/other_user}","gists_url":"https://api.github.com/users/rafalp/gists{/gist_id}","starred_url":"https://api.github.com/users/rafalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafalp/subscriptions","organizations_url":"https://api.github.com/users/rafalp/orgs","repos_url":"https://api.github.com/users/rafalp/repos","events_url":"https://api.github.com/users/rafalp/events{/privacy}","received_events_url":"https://api.github.com/users/rafalp/received_events","type":"User","site_admin":false},"labels":[{"id":454221009,"url":"https://api.github.com/repos/mirumee/saleor/labels/dashboard","name":"dashboard","color":"afffcb","default":false},{"id":454221094,"url":"https://api.github.com/repos/mirumee/saleor/labels/storefront","name":"storefront","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"mad-anne","id":20802901,"avatar_url":"https://avatars1.githubusercontent.com/u/20802901?v=4","gravatar_id":"","url":"https://api.github.com/users/mad-anne","html_url":"https://github.com/mad-anne","followers_url":"https://api.github.com/users/mad-anne/followers","following_url":"https://api.github.com/users/mad-anne/following{/other_user}","gists_url":"https://api.github.com/users/mad-anne/gists{/gist_id}","starred_url":"https://api.github.com/users/mad-anne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mad-anne/subscriptions","organizations_url":"https://api.github.com/users/mad-anne/orgs","repos_url":"https://api.github.com/users/mad-anne/repos","events_url":"https://api.github.com/users/mad-anne/events{/privacy}","received_events_url":"https://api.github.com/users/mad-anne/received_events","type":"User","site_admin":false},"assignees":[{"login":"mad-anne","id":20802901,"avatar_url":"https://avatars1.githubusercontent.com/u/20802901?v=4","gravatar_id":"","url":"https://api.github.com/users/mad-anne","html_url":"https://github.com/mad-anne","followers_url":"https://api.github.com/users/mad-anne/followers","following_url":"https://api.github.com/users/mad-anne/following{/other_user}","gists_url":"https://api.github.com/users/mad-anne/gists{/gist_id}","starred_url":"https://api.github.com/users/mad-anne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mad-anne/subscriptions","organizations_url":"https://api.github.com/users/mad-anne/orgs","repos_url":"https://api.github.com/users/mad-anne/repos","events_url":"https://api.github.com/users/mad-anne/events{/privacy}","received_events_url":"https://api.github.com/users/mad-anne/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mirumee/saleor/milestones/29","html_url":"https://github.com/mirumee/saleor/milestone/29","labels_url":"https://api.github.com/repos/mirumee/saleor/milestones/29/labels","id":3190312,"number":29,"title":"2018.04","description":"","creator":{"login":"elwoodxblues","id":5421321,"avatar_url":"https://avatars1.githubusercontent.com/u/5421321?v=4","gravatar_id":"","url":"https://api.github.com/users/elwoodxblues","html_url":"https://github.com/elwoodxblues","followers_url":"https://api.github.com/users/elwoodxblues/followers","following_url":"https://api.github.com/users/elwoodxblues/following{/other_user}","gists_url":"https://api.github.com/users/elwoodxblues/gists{/gist_id}","starred_url":"https://api.github.com/users/elwoodxblues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elwoodxblues/subscriptions","organizations_url":"https://api.github.com/users/elwoodxblues/orgs","repos_url":"https://api.github.com/users/elwoodxblues/repos","events_url":"https://api.github.com/users/elwoodxblues/events{/privacy}","received_events_url":"https://api.github.com/users/elwoodxblues/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":5,"state":"open","created_at":"2018-03-15T13:04:07Z","updated_at":"2018-04-26T14:18:14Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2018-03-15T17:25:32Z","updated_at":"2018-05-07T10:27:18Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mirumee/saleor/pulls/1929","html_url":"https://github.com/mirumee/saleor/pull/1929","diff_url":"https://github.com/mirumee/saleor/pull/1929.diff","patch_url":"https://github.com/mirumee/saleor/pull/1929.patch"},"body":"This PR contains my attempt at implementing proper VAT handling in Saleor's core.\r\n\r\nGeneral assumptions:\r\n\r\n- VAT is opt-in for stores that don't need it\r\n- VAT calculation is configurable: Saleor may be configured to assume that entered prices are either net or gross\r\n\r\nFixes #824 and #742\r\n\r\n\r\n### Note\r\n\r\nSome changes introduced on the repo are temporary and used to help with implementing tax changes:\r\n\r\n- Default country changed to PL (because its the country tax system I'm most familiar with, and geo2ip obv. doesn't work for `127.0.01`)\r\n- Net and tax data on products lists\r\n\r\n### TODO\r\n\r\n* [x] Ducttape WIP `django-prices-vatlayer` branch that works with `prices==1.0.0`\r\n* [x] Add some basic settings\r\n* [x] Make sure that taxes and discounts update prices correctly\r\n* [x] Swap around discount and price calculation\r\n* [x] Test `Product.get_price_per_item()`, `Product.get_price_range()`, `Product.get_gross_price_range()` and `ProductVariant.get_price_per_item()` without discounts and taxes, discounts only, taxes only, discounts and taxes.\r\n* [x] Support products exempt from vat\r\n* [x] Add taxes to products lists (home, category and collections)\r\n* [x] Add taxes to cart (dropdown and full)\r\n* [x] Add taxes to checkout\r\n* [x] Add tax computation to shipping types\r\n* [x] Replace stopgaps `Product.tax_rate` (can be null) and `ProductType.tax_rate` (can be null) with proper model fields and dashboard UI\r\n* [x] Calculate prices correctly with order discounts\r\n* [x] Display taxes on order details\r\n* [x] Make payments capture/return/release actions handle taxes\r\n* [x] Display taxes on order details in dashboard\r\n* [x] Display taxes on invoices\r\n* [x] Remove debugging data (eg. net and tax details on products lists)\r\n* [x] Add missing tests\r\n* [x] Write guide for enabling VAT on your store\r\n\r\n### Pull Request Checklist\r\n\r\n(Please keep this section. It will make maintainer's life easier.)\r\n\r\n1. [ ] Privileged views and APIs are guarded by proper permission checks.\r\n1. [ ] All visible strings are translated with proper context.\r\n1. [ ] All data-formatting is locale-aware (dates, numbers, and so on).\r\n1. [ ] Database queries are optimized and the number of queries is constant.\r\n1. [ ] The changes are tested.\r\n1. [ ] The code is documented (docstrings, project documentation).\r\n1. [ ] Python code quality checks pass: `pycodestyle`, `pydocstyle`, `pylint`.\r\n1. [ ] JavaScript code quality checks pass: `eslint`.\r\n"},"comment":{"url":"https://api.github.com/repos/mirumee/saleor/issues/comments/387024374","html_url":"https://github.com/mirumee/saleor/pull/1929#issuecomment-387024374","issue_url":"https://api.github.com/repos/mirumee/saleor/issues/1929","id":387024374,"user":{"login":"NyanKiyoshi","id":6186720,"avatar_url":"https://avatars0.githubusercontent.com/u/6186720?v=4","gravatar_id":"","url":"https://api.github.com/users/NyanKiyoshi","html_url":"https://github.com/NyanKiyoshi","followers_url":"https://api.github.com/users/NyanKiyoshi/followers","following_url":"https://api.github.com/users/NyanKiyoshi/following{/other_user}","gists_url":"https://api.github.com/users/NyanKiyoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/NyanKiyoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NyanKiyoshi/subscriptions","organizations_url":"https://api.github.com/users/NyanKiyoshi/orgs","repos_url":"https://api.github.com/users/NyanKiyoshi/repos","events_url":"https://api.github.com/users/NyanKiyoshi/events{/privacy}","received_events_url":"https://api.github.com/users/NyanKiyoshi/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T10:27:18Z","updated_at":"2018-05-07T10:27:18Z","author_association":"CONTRIBUTOR","body":"Welcome back and awesome job! I will look tonight, once home, if it fixes the issue or not."}}
{"actor":{"display_login":"NyanKiyoshi"}}