CAllCrmQuote::isActiveQuotePaymentMethodExists

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmQuote
  4. isActiveQuotePaymentMethodExists
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_quote.php
  • Класс: \CAllCrmQuote
  • Вызов: CAllCrmQuote::isActiveQuotePaymentMethodExists
static function isActiveQuotePaymentMethodExists()
{
	$result = false;

	$arPersonTypes = CCrmPaySystem::getPersonTypeIDs();
	foreach ($arPersonTypes as $personTypeName => $personTypeId)
	{
		if ($personTypeName === 'COMPANY' || $personTypeName === 'CONTACT' && $personTypeId > 0)
		{
			$paySystems = CCrmPaySystem::GetPaySystems($personTypeId);
			if(is_array($paySystems))
			{
				foreach($paySystems as &$paySystem)
				{
					$file = isset($paySystem['~PSA_ACTION_FILE']) ? $paySystem['~PSA_ACTION_FILE'] : '';
					if(preg_match('/quote(_\w+)*$/i'.BX_UTF_PCRE_MODIFIER, $file))
					{
						$result = true;
						break;
					}
				}
			}
		}
		if ($result)
		{
			break;
		}
	}

	return $result;
}

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