• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/rest/cashboxservice.php
  • Класс: BitrixSaleCashboxRestCashboxService
  • Вызов: CashboxService::checkParamsBeforeCashboxSettingsUpdate
static function checkParamsBeforeCashboxSettingsUpdate(array $params)
{
	if (empty($params['ID']))
	{
		throw new RestException('Parameter ID is not defined', self::ERROR_CHECK_FAILURE);
	}

	if (empty($params['FIELDS']))
	{
		throw new RestException('Parameter FIELDS is not defined', self::ERROR_CHECK_FAILURE);
	}

	$cashbox = Manager::getObjectById($params['ID']);
	if (!$cashbox)
	{
		throw new RestException('Cashbox not found', self::ERROR_CASHBOX_NOT_FOUND);
	}

	if (!self::hasAccessToCashbox($cashbox, $params['APP_ID']))
	{
		throw new AccessException();
	}
}