fix locations
This commit is contained in:
parent
9e4b72c3ae
commit
c5c0804ee7
@ -664,10 +664,18 @@ class ICrmOrderActions
|
||||
CSaleOrderPropsValue::Update($ar['ID'], array('VALUE' => self::fromJSON($order['deliveryAddress']['text'])));
|
||||
break;
|
||||
case 'LOCATION': if (isset($order['deliveryAddress']['city'])) {
|
||||
$prop = CSaleOrderProps::GetByID($ar['ORDER_PROPS_ID']);
|
||||
|
||||
if($prop['TYPE'] == 'LOCATION') {
|
||||
$cityId = self::getLocationCityId(self::fromJSON($order['deliveryAddress']['city']));
|
||||
if (!$cityId)
|
||||
break;
|
||||
|
||||
CSaleOrderPropsValue::Update($ar['ID'], array('VALUE' => $cityId));
|
||||
break;
|
||||
}
|
||||
|
||||
CSaleOrderPropsValue::Update($ar['ID'], array('VALUE' => self::fromJSON($order['deliveryAddress']['city'])));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1174,8 +1182,14 @@ class ICrmOrderActions
|
||||
case $arParams['optionsOrderProps'][$arFields['PERSON_TYPE_ID']]['text']: $resOrderDeliveryAddress['text'] = self::toJSON($ar['VALUE']);
|
||||
break;
|
||||
case 'LOCATION': if(!isset($resOrderDeliveryAddress['city']) && !$resOrderDeliveryAddress['city']) {
|
||||
$prop = CSaleOrderProps::GetByID($ar['ORDER_PROPS_ID']);
|
||||
if($prop['TYPE'] == 'LOCATION') {
|
||||
$resOrderDeliveryAddress['city'] = CSaleLocation::GetByID($ar['VALUE']);
|
||||
$resOrderDeliveryAddress['city'] = self::toJSON($resOrderDeliveryAddress['city']['CITY_NAME_LANG']);
|
||||
break;
|
||||
}
|
||||
$resOrderDeliveryAddress['city'] = self::toJSON($ar['VALUE']);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case $arParams['optionsOrderProps'][$arFields['PERSON_TYPE_ID']]['fio']: $contactNameArr = self::explodeFIO($ar['VALUE']);
|
||||
|
Loading…
Reference in New Issue
Block a user