...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_external_sale_import.php
- Класс: \CCrmExternalSaleImport
- Вызов: CCrmExternalSaleImport::SaveOrderData
private function SaveOrderData($arOrder, $skipBP = false) { self::AddTrace(array('SAVE_ORDER_DATA:START' => $arOrder)); $companyId = 0; $contactId = 0; if (isset($arOrder["CONTRACTOR"]["OFFICIAL_NAME"])) { $result = $this->SaveOrderDataCompany($arOrder); if (!$result) return false; [$companyId, $isNewCompany] = $result; if (!$skipBP) $this->SaveOrderDataCompanyBP($companyId, $isNewCompany); } else { $result = $this->SaveOrderDataContact($arOrder); if (!$result) return false; [$contactId, $isNewContact] = $result; if (!$skipBP) $this->SaveOrderDataContactBP($contactId, $isNewContact); } $result = $this->SaveOrderDataDeal($arOrder, $contactId, $companyId); if (!$result) return false; [$dealId, $isNewDeal] = $result; $this->SaveOrderDataProducts($arOrder, $dealId); if (!$skipBP) $this->SaveOrderDataDealBP($dealId, $isNewDeal); self::AddTrace('SAVE_ORDER_DATA:FINISED'); return true; }