Common/EventListener/AbstractSaleListener.php
protected function updateVatDisplayMode(SaleInterface $sale)
    {
        // Vat display mode must not change if sale has payments
        if ($sale->hasPayments()) {
            return false;
        }

        $mode = null;
        if (null !== $group = $sale->getCustomerGroup()) {
            $mode = $group->getVatDisplayMode();
        }
        if (null === $mode) {
            $mode = $this->defaultVatDisplayMode;
        }

        if ($mode !== $sale->getVatDisplayMode()) {
            $sale->setVatDisplayMode($mode);

            return true;
        }

        return false;
    }
protected function updateVatDisplayMode(SaleInterface $sale)
    {
        // Vat display mode must not change if sale has payments
        if ($sale->hasPayments()) {
            return false;
        }

        $mode = null;
        if (null !== $group = $sale->getCustomerGroup()) {
            $mode = $group->getVatDisplayMode();
        }
        if (null === $mode) {
            $mode = $this->defaultVatDisplayMode;
        }

        if ($mode !== $sale->getVatDisplayMode()) {
            $sale->setVatDisplayMode($mode);

            return true;
        }

        return false;
    }
Updates the vat display mode.

@param SaleInterface $sale

@return bool