...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_pay_system.php
- Класс: \CCrmPaySystem
- Вызов: CCrmPaySystem::getPresetCountryIdByPS
static function getPresetCountryIdByPS($psType, $psLocalization) { $curPresetCountryId = Bitrix\Crm\EntityPreset::getCurrentCountryId(); $idRU = GetCountryIdByCode('RU'); $idBY = GetCountryIdByCode('BY'); $idKZ = GetCountryIdByCode('KZ'); $idUA = GetCountryIdByCode('UA'); $idDE = GetCountryIdByCode('DE'); $idUS = GetCountryIdByCode('US'); $presetCountryId = $idUS; switch ($psLocalization) { case 'ru': switch ($curPresetCountryId) { case $idBY: $presetCountryId = $idBY; break; case $idKZ: $presetCountryId = $idKZ; break; case $idUA: if ($psType === 'quote') { $presetCountryId = $idUA; } else { $presetCountryId = $idRU; } break; default: $presetCountryId = $idRU; } break; case 'by': $presetCountryId = $idBY; break; case 'kz': $presetCountryId = $idKZ; break; case 'ua': $presetCountryId = $idUA; break; case 'de': $presetCountryId = $idDE; break; case 'en': case 'la': case 'br': case 'fr': $presetCountryId = $idUS; break; } return $presetCountryId; }