CCrmProductResult::__construct

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmProductResult
  4. __construct
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_product_result.php
  • Класс: \CCrmProductResult
  • Вызов: CCrmProductResult::__construct
function __construct($res, $arFields = array(), $arAdditionalFilter = array(), $arAdditionalSelect = array(), $arOptions = array())
{
	parent::__construct($res);
	$fields = $arFields;
	foreach ($fields as $k => $v)
	{
		$str = strval($v);
		if (trim($str) === '') unset($fields[$k]);
	}
	$this->arFieldAssoc = array_flip($fields);
	$this->arAdditionalFilter = $arAdditionalFilter;
	$this->arAdditionalSelect = $arAdditionalSelect;
	$this->bRealPrice = false;
	if (is_array($arOptions) && count($arOptions) > 0)
	{
		if (isset($arOptions['REAL_PRICE']) && $arOptions['REAL_PRICE'] === true)
		{
			$this->bRealPrice = true;
		}
	}

	self::$bVatMode = CCrmTax::isVatMode();
	if (self::$bVatMode)
		self::$arVatRates = CCrmVat::GetAll();
}

Добавить комментарий