public static function unSetVatMode() { if (!CModule::IncludeModule('catalog')) { return false; } $count = 0; $arActiveVats = array(); $dbActiveVats = CCatalogVat::GetListEx(array(), array('ACTIVE' => 'Y'), false, false, array('ID')); while ($arVat = $dbActiveVats->Fetch()) { $arActiveVats[] = $arVat['ID']; CCatalogVat::Update($arVat['ID'], array('ACTIVE' => 'N')); $count++; } $strActiveVats = !empty($arActiveVats) ? implode(',', $arActiveVats) : ''; COption::SetOptionString("crm", "crmSaveActiveVats", $strActiveVats); COption::SetOptionString("crm", "vatModeSetted", 'N'); self::$bVatMode = false; return $count; }