{"push_id":1435237971,"size":2,"distinct_size":1,"ref":"refs/heads/develop","head":"3e24ffea9051330552bb13324398ed967b71fc8e","before":"5c05975221c185d958a6085abb36c0a371d2983b","commits":[{"sha":"4f9f8ab270880b12c60debde40acb28103d5f691","author":{"name":"Matt Johnson","email":"338428e549542c6416b745c21ece88f419415a62@classyllama.com"},"message":"#421_41 - Accommodate shipping discount in tax calculation\n\n\\Magento\\Tax\\Model\\Calculation\\AbstractAggregateCalculator::calculateWithTaxNotInPrice\nmakes a call to get the discount amount $item->getDiscountAmount()\nbut the shipping item returns a null value for the discount amount causing it to calculate tax on the shipping item regardless.\n\nThe items that are passed into the calculation routines come from\n\\Magento\\Tax\\Model\\Sales\\Total\\Quote\\Tax::collect\n\\Magento\\Tax\\Model\\Sales\\Total\\Quote\\Tax::getQuoteTaxDetails\n\nStarts building $itemDataObjects for normal quote items via $this->mapItems()\n\\Magento\\Tax\\Model\\Sales\\Total\\Quote\\CommonTaxCollector::mapItems\nwhich is builds from getting the details out of the ShippingAssignmentInterface item data.\n\nIt then gets the shipping item via $this->getShippingDataObject()\n\\Magento\\Tax\\Model\\Sales\\Total\\Quote\\CommonTaxCollector::getShippingDataObject\nand it builds the data from the details in QuoteAddress\\Total details that are passed in.\nIt looks for $total->getShippingDiscountAmount() but that value isn't set.\n\nWhen the quote discounts are collected\n\\Magento\\SalesRule\\Model\\Quote\\Discount::collect\n$this->calculator->processShippingAmount($address)\n\\Magento\\SalesRule\\Model\\Validator::processShippingAmount\nThere ends up being a shipping discount amount on the address object, but it never gets set to the total object.\n\nThe shipping discount amount does end up being accessible from the ShippingAssignmentInterface object\nthat is passed into the collect() methods during tax calculation though:\n$shippingAssignment->getShipping()->getAddress()->getShippingDiscountAmount()","distinct":false,"url":"https://api.github.com/repos/classyllama/ClassyLlama_AvaTax/commits/4f9f8ab270880b12c60debde40acb28103d5f691"},{"sha":"3e24ffea9051330552bb13324398ed967b71fc8e","author":{"name":"Erik Hansen","email":"369dc53bf63697f2c0e4780f5bf5b0462a4b99ab@gmail.com"},"message":"Merge pull request #43 from classyllama/feature/421_41-tax-on-discouted-order\n\n#421_41 - Accommodate shipping discount in tax calculation","distinct":true,"url":"https://api.github.com/repos/classyllama/ClassyLlama_AvaTax/commits/3e24ffea9051330552bb13324398ed967b71fc8e"}]}
{"actor":{"display_login":"erikhansen"}}