• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/actualentityselector.php
  • Класс: Bitrix\Crm\Integrity\ActualEntitySelector
  • Вызов: ActualEntitySelector::canCreateDeal
public function canCreateDeal()
{
	$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;
}