• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice_invoice.php
  • Класс: \CCrmRestVat
  • Вызов: CCrmRestVat::get
static function get($params)
{
	if (!CModule::IncludeModule('catalog'))
		throw new RestException('The Commercial Catalog module is not installed.');

	global $USER;

	$CrmPerms = new CCrmPerms($USER->GetID());
	if (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ'))
		throw new RestException('Access denied.');

	$ID = CCrmInvoiceRestUtil::getParamScalar($params, 'id', 0);
	$arResult = CCrmVat::GetByID($ID);
	if ($arResult === false)
		throw new RestException('VAT rate not found.');
	$arResult = self::filterFields($arResult, 'get');

	return $arResult;
}