• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/notification.php
  • Класс: BitrixVoximplantNotification
  • Вызов: Notification::shouldShowWarningForFreePortals
static function shouldShowWarningForFreePortals($ignoreClosed = false)
{
	if (Limits::canManageTelephony())
	{
		return false;
	}

	if (!$ignoreClosed)
	{
		$ls = BitrixMainApplication::getInstance()->getLocalSession('telephony_notification_free_plan');
		if ($ls->get('closed') === 'Y')
		{
			return false;
		}
	}

	if (CVoxImplantPhone::getRentedNumbersCount() > 0)
	{
		return 'rent';
	}
	if (CVoxImplantSip::hasConnection())
	{
		return 'sip';
	}
	$account = new CVoxImplantAccount();
	$balance = $account->getAccountBalance(false);
	return $balance > 0 ? 'rent' : false;
}