CAllCrmQuote::CheckConvertPermission

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmQuote
  4. CheckConvertPermission
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_quote.php
  • Класс: \CAllCrmQuote
  • Вызов: CAllCrmQuote::CheckConvertPermission
static function CheckConvertPermission($ID = 0, $entityTypeID = 0, $userPermissions = null)
{
	if(!$userPermissions)
	{
		$userPermissions = CCrmPerms::GetCurrentUserPermissions();
	}

	if($entityTypeID === CCrmOwnerType::Deal)
	{
		return CCrmDeal::CheckCreatePermission($userPermissions);
	}
	elseif($entityTypeID === CCrmOwnerType::Invoice)
	{
		return CCrmInvoice::CheckCreatePermission($userPermissions);
	}

	return (CCrmDeal::CheckCreatePermission($userPermissions)
		|| CCrmInvoice::CheckCreatePermission($userPermissions));
}

Добавить комментарий