Common/EventListener/AbstractSaleListener.php
protected function isDiscountUpdateNeeded(SaleInterface $sale)
    {
        if ($this->persistenceHelper->isChanged($sale, ['autoDiscount'])) {
            return true;
        }

        if ((0 == $sale->getPaidTotal()) && $this->persistenceHelper->isChanged($sale, ['customerGroup', 'customer'])) {
            return true;
        }

        return $this->didInvoiceCountryChanged($sale);
    }
protected function isDiscountUpdateNeeded(SaleInterface $sale)
    {
        if ($this->persistenceHelper->isChanged($sale, ['autoDiscount'])) {
            return true;
        }

        if ((0 == $sale->getPaidTotal()) && $this->persistenceHelper->isChanged($sale, ['customerGroup', 'customer'])) {
            return true;
        }

        return $this->didInvoiceCountryChanged($sale);
    }
Returns whether or not the discount adjustments should be updated.

@param SaleInterface $sale

@return bool