Rating::getRatio

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. Rating
  4. getRatio
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/bitrix24/limitation/rating.php
  • Класс: Bitrix\Sender\Integration\Bitrix24\Limitation\Rating
  • Вызов: Rating::getRatio
static function getRatio($daysLeft = 0)
{
	$result = Model\DailyCounterTable::getRowByDate($daysLeft);
	$sentCount = $result ? (int) $result['SENT_CNT'] - (int) $result['ERROR_CNT'] : 0;
	$abuseCount = $result ? $result['ABUSE_CNT'] : 0;
	if (!$sentCount || $sentCount < 200 || !$abuseCount)
	{
		return 0;
	}

	return round($abuseCount / $sentCount, 3);
}

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