• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/entity/orderimport.php
  • Класс: BitrixSaleExchangeEntityOrderImport
  • Вызов: OrderImport::convertCurrency
protected function convertCurrency(array $item)
{
	$result = array();
	$result['CURRENCY'] = $this->settings->getCurrency();

		/** @var Order $order */
	$order = $this->getEntity();

	if($this->getEntityId()>0 && $order->getCurrency() <> $this->settings->getCurrency())
	{
		$item['PRICE'] = CCurrencyRates::ConvertCurrency($item['PRICE'], $this->settings->getCurrency(), $order->getCurrency());
		$this->setCollisions(EntityCollisionType::OrderBasketItemsCurrencyModify, $this->getEntity());
		$result['CURRENCY'] = $order->getCurrency();
	}

	$result['PRICE'] = $item['PRICE'];

	return $result;
}