{"action":"closed","issue":{"url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4139","repository_url":"https://api.github.com/repos/reactioncommerce/reaction","labels_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4139/labels{/name}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4139/comments","events_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4139/events","html_url":"https://github.com/reactioncommerce/reaction/issues/4139","id":310772024,"node_id":"MDU6SXNzdWUzMTA3NzIwMjQ=","number":4139,"title":"TaxCloud: Tax calculation should take product's tax code into account","user":{"login":"prinzdezibel","id":1733229,"node_id":"MDQ6VXNlcjE3MzMyMjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1733229?v=4","gravatar_id":"","url":"https://api.github.com/users/prinzdezibel","html_url":"https://github.com/prinzdezibel","followers_url":"https://api.github.com/users/prinzdezibel/followers","following_url":"https://api.github.com/users/prinzdezibel/following{/other_user}","gists_url":"https://api.github.com/users/prinzdezibel/gists{/gist_id}","starred_url":"https://api.github.com/users/prinzdezibel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prinzdezibel/subscriptions","organizations_url":"https://api.github.com/users/prinzdezibel/orgs","repos_url":"https://api.github.com/users/prinzdezibel/repos","events_url":"https://api.github.com/users/prinzdezibel/events{/privacy}","received_events_url":"https://api.github.com/users/prinzdezibel/received_events","type":"User","site_admin":false},"labels":[{"id":377481506,"node_id":"MDU6TGFiZWwzNzc0ODE1MDY=","url":"https://api.github.com/repos/reactioncommerce/reaction/labels/bug","name":"bug","color":"ff3737","default":true},{"id":695679879,"node_id":"MDU6TGFiZWw2OTU2Nzk4Nzk=","url":"https://api.github.com/repos/reactioncommerce/reaction/labels/impact-major","name":"impact-major","color":"d93f0b","default":false},{"id":863777895,"node_id":"MDU6TGFiZWw4NjM3Nzc4OTU=","url":"https://api.github.com/repos/reactioncommerce/reaction/labels/integrations","name":"integrations","color":"0f95dd","default":false}],"state":"closed","locked":false,"assignee":{"login":"Akarshit","id":7762605,"node_id":"MDQ6VXNlcjc3NjI2MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/7762605?v=4","gravatar_id":"","url":"https://api.github.com/users/Akarshit","html_url":"https://github.com/Akarshit","followers_url":"https://api.github.com/users/Akarshit/followers","following_url":"https://api.github.com/users/Akarshit/following{/other_user}","gists_url":"https://api.github.com/users/Akarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/Akarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akarshit/subscriptions","organizations_url":"https://api.github.com/users/Akarshit/orgs","repos_url":"https://api.github.com/users/Akarshit/repos","events_url":"https://api.github.com/users/Akarshit/events{/privacy}","received_events_url":"https://api.github.com/users/Akarshit/received_events","type":"User","site_admin":false},"assignees":[{"login":"Akarshit","id":7762605,"node_id":"MDQ6VXNlcjc3NjI2MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/7762605?v=4","gravatar_id":"","url":"https://api.github.com/users/Akarshit","html_url":"https://github.com/Akarshit","followers_url":"https://api.github.com/users/Akarshit/followers","following_url":"https://api.github.com/users/Akarshit/following{/other_user}","gists_url":"https://api.github.com/users/Akarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/Akarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akarshit/subscriptions","organizations_url":"https://api.github.com/users/Akarshit/orgs","repos_url":"https://api.github.com/users/Akarshit/repos","events_url":"https://api.github.com/users/Akarshit/events{/privacy}","received_events_url":"https://api.github.com/users/Akarshit/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-04-03T10:03:38Z","updated_at":"2018-11-08T04:03:06Z","closed_at":"2018-11-08T04:03:05Z","author_association":"CONTRIBUTOR","body":"## Prerequisites\r\n* [x] Are you running the latest version?\r\n* [x] Are you able to consistently reproduce the issue?\r\n* [x] Did you search the issue queue for existing issue?\r\n\r\n## Issue Description\r\nWhen calculating the tax via taxcloud, the calculation should use the product's tax code instead of the dummy value \"00000\"\r\n\r\n## Steps to Reproduce\r\nThis issue is difficult to reproduce, because it depends on having the application fetched all valid tax codes from the taxcloud API. This does not work ATM and is addressed in this ticket: #4138 \r\n\r\nHowever, as one can see in  \"/imports/plugins/included/taxes-taxcloud/server/hooks/hooks.js\", line 65 the submitted tax code is hard-coded to \"00000\", regardless of the tax code that is specified on a per product basis.\r\n\r\n```\r\n          // format cart items to TaxCloud structure\r\n          let index = 0;\r\n          for (const items of cartToCalc.items) {\r\n            // only processs taxable products\r\n            if (items.variants.taxable === true) {\r\n              const item = {\r\n                Index: index,\r\n                ItemID: items.variants._id,\r\n                TIC: \"00000\",\r\n                Price: items.variants.price,\r\n                Qty: items.quantity\r\n              };\r\n              index += 1;\r\n              cartItems.push(item);\r\n            }\r\n          }\r\n```\r\n\r\n\r\n### Versions\r\nNode: 8.2.1\r\nNPM: 5.3.0\r\nMeteor Node: 8.9.4\r\nMeteor NPM: 5.6.0\r\nReaction CLI: 0.29.0\r\nReaction: 1.10.0\r\nReaction branch: master\r\nDocker: 17.03.1-ce\r\n"}}
{"actor":{"display_login":"zenweasel"}}