{"action":"created","issue":{"url":"https://api.github.com/repos/AltaPay/magento2/issues/2","repository_url":"https://api.github.com/repos/AltaPay/magento2","labels_url":"https://api.github.com/repos/AltaPay/magento2/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/AltaPay/magento2/issues/2/comments","events_url":"https://api.github.com/repos/AltaPay/magento2/issues/2/events","html_url":"https://github.com/AltaPay/magento2/issues/2","id":198688775,"number":2,"title":"Multiple order lines of type handling","user":{"login":"et-altapay-com","id":20107467,"avatar_url":"https://avatars.githubusercontent.com/u/20107467?v=3","gravatar_id":"","url":"https://api.github.com/users/et-altapay-com","html_url":"https://github.com/et-altapay-com","followers_url":"https://api.github.com/users/et-altapay-com/followers","following_url":"https://api.github.com/users/et-altapay-com/following{/other_user}","gists_url":"https://api.github.com/users/et-altapay-com/gists{/gist_id}","starred_url":"https://api.github.com/users/et-altapay-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/et-altapay-com/subscriptions","organizations_url":"https://api.github.com/users/et-altapay-com/orgs","repos_url":"https://api.github.com/users/et-altapay-com/repos","events_url":"https://api.github.com/users/et-altapay-com/events{/privacy}","received_events_url":"https://api.github.com/users/et-altapay-com/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"et-altapay-com","id":20107467,"avatar_url":"https://avatars.githubusercontent.com/u/20107467?v=3","gravatar_id":"","url":"https://api.github.com/users/et-altapay-com","html_url":"https://github.com/et-altapay-com","followers_url":"https://api.github.com/users/et-altapay-com/followers","following_url":"https://api.github.com/users/et-altapay-com/following{/other_user}","gists_url":"https://api.github.com/users/et-altapay-com/gists{/gist_id}","starred_url":"https://api.github.com/users/et-altapay-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/et-altapay-com/subscriptions","organizations_url":"https://api.github.com/users/et-altapay-com/orgs","repos_url":"https://api.github.com/users/et-altapay-com/repos","events_url":"https://api.github.com/users/et-altapay-com/events{/privacy}","received_events_url":"https://api.github.com/users/et-altapay-com/received_events","type":"User","site_admin":false},"assignees":[{"login":"et-altapay-com","id":20107467,"avatar_url":"https://avatars.githubusercontent.com/u/20107467?v=3","gravatar_id":"","url":"https://api.github.com/users/et-altapay-com","html_url":"https://github.com/et-altapay-com","followers_url":"https://api.github.com/users/et-altapay-com/followers","following_url":"https://api.github.com/users/et-altapay-com/following{/other_user}","gists_url":"https://api.github.com/users/et-altapay-com/gists{/gist_id}","starred_url":"https://api.github.com/users/et-altapay-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/et-altapay-com/subscriptions","organizations_url":"https://api.github.com/users/et-altapay-com/orgs","repos_url":"https://api.github.com/users/et-altapay-com/repos","events_url":"https://api.github.com/users/et-altapay-com/events{/privacy}","received_events_url":"https://api.github.com/users/et-altapay-com/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/AltaPay/magento2/milestones/1","html_url":"https://github.com/AltaPay/magento2/milestone/1","labels_url":"https://api.github.com/repos/AltaPay/magento2/milestones/1/labels","id":2228110,"number":1,"title":"v1.0.0","description":"","creator":{"login":"lsv","id":20708,"avatar_url":"https://avatars.githubusercontent.com/u/20708?v=3","gravatar_id":"","url":"https://api.github.com/users/lsv","html_url":"https://github.com/lsv","followers_url":"https://api.github.com/users/lsv/followers","following_url":"https://api.github.com/users/lsv/following{/other_user}","gists_url":"https://api.github.com/users/lsv/gists{/gist_id}","starred_url":"https://api.github.com/users/lsv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsv/subscriptions","organizations_url":"https://api.github.com/users/lsv/orgs","repos_url":"https://api.github.com/users/lsv/repos","events_url":"https://api.github.com/users/lsv/events{/privacy}","received_events_url":"https://api.github.com/users/lsv/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2017-01-04T13:52:50Z","updated_at":"2017-01-04T13:53:06Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2017-01-04T11:40:33Z","updated_at":"2017-01-04T14:01:44Z","closed_at":null,"body":"I created an order that contains only one discount. \r\n\r\nThe discount was created in the Magento backend (in Marketing > Cart Price Rules).\r\n\r\nThe resulting order lines contains multiple lines of type handling. Ideally, it should contain\r\nonly one line of type handling. More then one line of type handling can exist if there was\r\nmultiple discounts applied (multiple coupons applied, for example), but that wasn't the case.\r\nAlso, the handling amount must be negative.\r\n\r\nExpected order lines:\r\n\r\norderLines[0][description]:\tAffirm Water Bottle\r\norderLines[0][itemId]:\t24-UG06\r\norderLines[0][quantity]:\t1.0000\r\norderLines[0][unitPrice]:\t7.0000\r\norderLines[0][goodsType]:\titem\r\norderLines[1][description]:\tStrive Shoulder Pack\r\norderLines[1][itemId]:\t24-MB04\r\norderLines[1][quantity]:\t2.0000\r\norderLines[1][unitPrice]:\t32.0000\r\norderLines[1][goodsType]:\titem\r\norderLines[2][description]:\tDual Handle Cardio Ball\r\norderLines[2][itemId]:\t24-UG07\r\norderLines[2][quantity]:\t1.0000\r\norderLines[2][unitPrice]:\t12.0000\r\norderLines[2][goodsType]:\titem\r\n**orderLines[3][description]:\tDiscount\r\norderLines[3][itemId]:\tcoupon-id\r\norderLines[3][quantity]:\t1\r\norderLines[3][unitPrice]:\t-9.22\r\norderLines[3][goodsType]:\thandling**\r\norderLines[4][description]:\tflatrate\r\norderLines[4][itemId]:\tflatrate\r\norderLines[4][quantity]:\t1\r\norderLines[4][unitPrice]:\t5.0000\r\norderLines[4][goodsType]:\tshipment\r\n\r\nActual order lines:\r\n\r\norderLines[0][description]:\tAffirm Water Bottle\r\norderLines[0][itemId]:\t24-UG06\r\norderLines[0][quantity]:\t1.0000\r\norderLines[0][unitPrice]:\t7.0000\r\norderLines[0][goodsType]:\titem\r\norderLines[1][description]:\tAffirm Water Bottle\r\norderLines[1][itemId]:\t24-UG06\r\norderLines[1][quantity]:\t1\r\norderLines[1][unitPrice]:\t0.7800\r\norderLines[1][goodsType]:\thandling\r\norderLines[2][description]:\tStrive Shoulder Pack\r\norderLines[2][itemId]:\t24-MB04\r\norderLines[2][quantity]:\t2.0000\r\norderLines[2][unitPrice]:\t32.0000\r\norderLines[2][goodsType]:\titem\r\norderLines[3][description]:\tStrive Shoulder Pack\r\norderLines[3][itemId]:\t24-MB04\r\norderLines[3][quantity]:\t1\r\norderLines[3][unitPrice]:\t7.1100\r\norderLines[3][goodsType]:\thandling\r\norderLines[4][description]:\tDual Handle Cardio Ball\r\norderLines[4][itemId]:\t24-UG07\r\norderLines[4][quantity]:\t1.0000\r\norderLines[4][unitPrice]:\t12.0000\r\norderLines[4][goodsType]:\titem\r\norderLines[5][description]:\tDual Handle Cardio Ball\r\norderLines[5][itemId]:\t24-UG07\r\norderLines[5][quantity]:\t1\r\norderLines[5][unitPrice]:\t1.3300\r\norderLines[5][goodsType]:\thandling\r\norderLines[6][description]:\tflatrate\r\norderLines[6][itemId]:\tflatrate\r\norderLines[6][quantity]:\t1\r\norderLines[6][unitPrice]:\t5.0000\r\norderLines[6][goodsType]:\tshipment"},"comment":{"url":"https://api.github.com/repos/AltaPay/magento2/issues/comments/270376882","html_url":"https://github.com/AltaPay/magento2/issues/2#issuecomment-270376882","issue_url":"https://api.github.com/repos/AltaPay/magento2/issues/2","id":270376882,"user":{"login":"lsv","id":20708,"avatar_url":"https://avatars.githubusercontent.com/u/20708?v=3","gravatar_id":"","url":"https://api.github.com/users/lsv","html_url":"https://github.com/lsv","followers_url":"https://api.github.com/users/lsv/followers","following_url":"https://api.github.com/users/lsv/following{/other_user}","gists_url":"https://api.github.com/users/lsv/gists{/gist_id}","starred_url":"https://api.github.com/users/lsv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsv/subscriptions","organizations_url":"https://api.github.com/users/lsv/orgs","repos_url":"https://api.github.com/users/lsv/repos","events_url":"https://api.github.com/users/lsv/events{/privacy}","received_events_url":"https://api.github.com/users/lsv/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T14:01:44Z","updated_at":"2017-01-04T14:01:44Z","body":"Also, special price on a product does not create a handling orderline\n\n\n\nDen 04-01-2017 kl. 15:00 skrev Martin:\n>\n> So if a product has a discount (created from a cart rule or catalog \n> rule) it should not be a handling orderline?\n>\n>\n> Den 04-01-2017 kl. 14:58 skrev et-altapay-com:\n>>\n>> I think if the discount is on the product, you can save the value \n>> with discount in the unitPrice field (no need to create a handling line).\n>>\n>> But if it's a coupon, you can create a handling line for the coupon.\n>>\n>> —\n>> You are receiving this because you commented.\n>> Reply to this email directly, view it on GitHub \n>> <https://github.com/AltaPay/magento2/issues/2#issuecomment-270376088>, \n>> or mute the thread \n>> <https://github.com/notifications/unsubscribe-auth/AABQ5CHiPUtcpMb1Uru1dj280pJn7CuDks5rO6VqgaJpZM4LaikP>.\n>>\n>\n\n"}}
{"actor":{"display_login":"lsv"}}