{"action":"opened","issue":{"url":"https://api.github.com/repos/CORE-POS/IS4C/issues/531","labels_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/531/labels{/name}","comments_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/531/comments","events_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/531/events","html_url":"https://github.com/CORE-POS/IS4C/issues/531","id":95034059,"number":531,"title":"Pricemethod + Sale Batch conflicts","user":{"login":"joelbrock","id":52835,"avatar_url":"https://avatars.githubusercontent.com/u/52835?v=3","gravatar_id":"","url":"https://api.github.com/users/joelbrock","html_url":"https://github.com/joelbrock","followers_url":"https://api.github.com/users/joelbrock/followers","following_url":"https://api.github.com/users/joelbrock/following{/other_user}","gists_url":"https://api.github.com/users/joelbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/joelbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelbrock/subscriptions","organizations_url":"https://api.github.com/users/joelbrock/orgs","repos_url":"https://api.github.com/users/joelbrock/repos","events_url":"https://api.github.com/users/joelbrock/events{/privacy}","received_events_url":"https://api.github.com/users/joelbrock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Bugs","name":"Bugs","color":"ededed"},{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Code%20Enhancing","name":"Code Enhancing","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-14T20:35:04Z","updated_at":"2015-07-14T20:35:04Z","closed_at":null,"body":"Have an interesting issue that I mostly understand:\r\n\r\nItems using a pricemethod = 6 (MoreThanQttyPM) are also in a sales batch and are not ringing up with the volume price adjustment.  Items NOT in a sales batch rcv. their volume price adjustments as expected.\r\nLet's look at one record from products:\r\n```sql\r\n                   upc: 0008600300486\r\n           description: Cabernet Sauvignon\r\n                 brand: NULL\r\n        formatted_name: NULL\r\n          normal_price: 9.99\r\n           pricemethod: 6\r\n            groupprice: 0.10\r\n              quantity: 6\r\n         special_price: 7.99\r\n    specialpricemethod: 0\r\n     specialgroupprice: 7.99\r\n       specialquantity: 0\r\n         special_limit: 0\r\n```\r\n\r\nNotice:  pricemethod = 6 but specialpricemethod = 0.  According to SalesBatchTask.php:96 $specialpricemethod should be equal to $row['pricemethod'], but in this case it is not.\r\nAdditionally i notice that specialgroupprice == special_price, which is what SalesBatchTask says to do.  It appears that because the item itself has grouppricing enabled, when it is in a sales batch the batcher also treats the sale item as a groupprice sale item.  So i'm not entirely sure how to reconcile the 2.\r\n\r\nThe co-op would need to decide whether the grouppricing applies to sale items as well.  But then SalesBatchTask needs to be able to update the records to either allow for volume discounts on sale items, or not."}}