- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/delivery/externallocationmap.php
- Класс: BitrixSaleDeliveryfor
- Вызов: for::getExternalId
static function getExternalId($locationId)
{
if($locationId == '')
return '';
$srvId = static::getExternalServiceId();
if($srvId <= 0)
return 0;
$res = LocationTable::getList(array(
'filter' => array(
array(
'LOGIC' => 'OR',
'=CODE' => $locationId,
'=ID' => $locationId
),
'=EXTERNAL.SERVICE_ID' => $srvId
),
'select' => array(
'ID', 'CODE',
'XML_ID' => 'EXTERNAL.XML_ID'
)
));
$result = '';
if($loc = $res->fetch())
$result = $loc['XML_ID'];
if($result == '')
$result = self::getUpperCityExternalId($locationId, $srvId);
return $result;
}