{"action":"created","issue":{"url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/369","repository_url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport","labels_url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/369/comments","events_url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/369/events","html_url":"https://github.com/shoppingflux/shoppingfluxexport/issues/369","id":326934312,"number":369,"title":"FDG are not set for tax_excl","user":{"login":"infiniweb","id":17177824,"avatar_url":"https://avatars2.githubusercontent.com/u/17177824?v=4","gravatar_id":"","url":"https://api.github.com/users/infiniweb","html_url":"https://github.com/infiniweb","followers_url":"https://api.github.com/users/infiniweb/followers","following_url":"https://api.github.com/users/infiniweb/following{/other_user}","gists_url":"https://api.github.com/users/infiniweb/gists{/gist_id}","starred_url":"https://api.github.com/users/infiniweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infiniweb/subscriptions","organizations_url":"https://api.github.com/users/infiniweb/orgs","repos_url":"https://api.github.com/users/infiniweb/repos","events_url":"https://api.github.com/users/infiniweb/events{/privacy}","received_events_url":"https://api.github.com/users/infiniweb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-28T08:01:05Z","updated_at":"2018-05-28T08:02:21Z","closed_at":null,"author_association":"COLLABORATOR","body":"## Expected behaviour\r\n\r\nWhen an order is created with fees (for CDiscount for exemple) and FDG is being created, the FDG record should be set with and without taxes.\r\n\r\n## Actual behaviour\r\n\r\nThe FDG has only its tax included price set, the tax excluded price is missing\r\n\r\n## Steps to reproduce the behaviour\r\n\r\nCreate an order from CDiscount with additional processing fees.\r\n"},"comment":{"url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/comments/392451607","html_url":"https://github.com/shoppingflux/shoppingfluxexport/issues/369#issuecomment-392451607","issue_url":"https://api.github.com/repos/shoppingflux/shoppingfluxexport/issues/369","id":392451607,"user":{"login":"infiniweb","id":17177824,"avatar_url":"https://avatars2.githubusercontent.com/u/17177824?v=4","gravatar_id":"","url":"https://api.github.com/users/infiniweb","html_url":"https://github.com/infiniweb","followers_url":"https://api.github.com/users/infiniweb/followers","following_url":"https://api.github.com/users/infiniweb/following{/other_user}","gists_url":"https://api.github.com/users/infiniweb/gists{/gist_id}","starred_url":"https://api.github.com/users/infiniweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infiniweb/subscriptions","organizations_url":"https://api.github.com/users/infiniweb/orgs","repos_url":"https://api.github.com/users/infiniweb/repos","events_url":"https://api.github.com/users/infiniweb/events{/privacy}","received_events_url":"https://api.github.com/users/infiniweb/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T08:02:21Z","updated_at":"2018-05-28T08:02:21Z","author_association":"COLLABORATOR","body":"The idea of the fix is something like that:\r\n\r\n```\r\n$fdgTaxExcluded = (float)((float)$order->TotalFees / (1 + ($tax_rate / 100)));\r\n$fdgInsertFields = array(\r\n    [...]\r\n    'total_price_tax_incl' => (float) $order->TotalFees,\r\n    'total_price_tax_excl' => $fdgTaxExcluded,\r\n    'unit_price_tax_incl' => (float) $order->TotalFees,\r\n    'unit_price_tax_excl' => $fdgTaxExcluded,\r\n```"}}
{"actor":{"display_login":"infiniweb"}}