protected function updateExchangeRate(SupplierOrderInterface $order)
    {
        // TODO Remove when supplier order payments will be implemented.
        if (null !== $order->getExchangeRate()) {
            return false;
        }

        if (!SupplierOrderStates::isStockableState($order->getState())) {
            return false;
        }

        $date = new \DateTime();

        $rate = $this->currencyConverter->getRate(
            $this->currencyConverter->getDefaultCurrency(),
            $order->getCurrency()->getCode(),
            $date
        );

        $order
            ->setExchangeRate($rate)
            ->setExchangeDate($date);

        return true;
    }