ActualEntitySelector::canCreateReturnCustomerLead

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ActualEntitySelector
  4. canCreateReturnCustomerLead
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/actualentityselector.php
  • Класс: Bitrix\Crm\Integrity\ActualEntitySelector
  • Вызов: ActualEntitySelector::canCreateReturnCustomerLead
public function canCreateReturnCustomerLead()
{
	$entities = $this->getEntities();
	$entityCount = count($entities);

	// Actual entities not found
	if ($entityCount === 0)
	{
		return false;
	}

	// Actual lead found only
	if ($this->getLeadId() && $entityCount === 1)
	{
		return false;
	}

	// Deal found
	if ($this->getDealId())
	{
		return false;
	}

	// Lead(return customer type) found
	if ($this->getReturnCustomerLeadId())
	{
		return false;
	}

	return true;
}

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