diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index 0517e692..092f80b0 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -749,4 +749,19 @@ class ICrmOrderActions )); } } + + public static function getLocationCityId($cityName) { + if(!$cityName) + return; + + $dbLocation = CSaleLocation::GetList( + array( + "SORT" => "ASC", + "CITY_NAME_LANG" => "ASC" + ), + array("LID" => "ru", "CITY_NAME" => $cityName), false, false, array()); + + if($location = $dbLocation->Fetch()) + return $location['ID']; + } } \ No newline at end of file