• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/integration/service/batchable/company.php
  • Класс: BitrixSaleExchangeIntegrationServiceBatchableCompany
  • Вызов: Company::init
public function init($params)
{
	//COMPANY			-> TITLE
	//COMPANY_ADR		-> REG_ADDRESS
	//INN				->
	//KPP				->
	//CONTACT_PERSON	->
	//EMAIL				-> EMAIL
	//PHONE				-> PHONE
	//FAX				->
	//ZIP				-> ADDRESS_POSTAL_CODE
	//CITY				-> ADDRESS_CITY
	//LOCATION			->
	//ADDRESS			-> ADDRESS

	foreach($params as $index=>$item)
	{
		$this->collection->addItem(
			IntegrationServiceInternalContainerItem::create(
				IntegrationServiceInternalEntityFactory::create($this->getDstEntityTypeId())
					->setOriginId($index)
					->setOriginatorId(static::ANALITICS_ORIGINATOR_ID)
					->setTitle($item['TITLE'])
					->setRegAddress($item['COMPANY_ADR'])
					->setEmail($item['EMAIL'])
					->setPhone($item['PHONE'])
					->setAddressPostalCode($item['ZIP'])
					->setAddressCity($item['CITY'])
					->setAddress($item['ADDRESS']))
				->setInternalIndex($index)
		);
	}

	$this->relationLoad();

	return $this;
}