• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Field/IsReturnCustomer.php
  • Класс: Bitrix\Crm\Field\IsReturnCustomer
  • Вызов: IsReturnCustomer::enrichClient
private function enrichClient(Item $item): void
{
	try
	{
		$sourceMerger = Merger\EntityMergerFactory::create($item->getEntityTypeId(), 0, false);
	}
	catch (NotSupportedException $sourceTypeNotSupportedException)
	{
		return;
	}

	if ($item->hasField(Item::FIELD_NAME_COMPANY_ID) && $item->getCompanyId() > 0)
	{
		$this->enrichCompany($sourceMerger, $item->getId(), $item->getCompanyId());
	}

	if ($item->hasField(Item::FIELD_NAME_CONTACTS) && $item->getPrimaryContact())
	{
		$this->enrichContact($sourceMerger, $item->getId(), $item->getPrimaryContact()->getId());
	}
}