• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory/SmartInvoice.php
  • Класс: Bitrix\Crm\Service\Factory\SmartInvoice
  • Вызов: SmartInvoice::updateConversionMaps
static function updateConversionMaps(): void
{
	$factory = Container::getInstance()->getFactory(\CCrmOwnerType::SmartInvoice);
	if (!$factory)
	{
		return;
	}
	$relationManager = Container::getInstance()->getRelationManager();
	$mapper = Container::getInstance()->getConversionMapper();
	foreach ($relationManager->getParentRelations(\CCrmOwnerType::SmartInvoice) as $relation)
	{
		if ($relation->getSettings()->isConversion())
		{
			$map = $mapper->createMap($relation->getIdentifier());
			if ($map)
			{
				$map->save();
			}
		}
	}
}