- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/handler/customers/regularcustomers.php
- Класс: Bitrix\Crm\Integration\Report\Handler\Customers\RegularCustomers
- Вызов: RegularCustomers::getGroupLabel
static function getGroupLabel(int $min, int $max)
{
if ($min == $max)
{
$suffixes = [5, 1, 2, 2, 2, 5];
$count = $min;
$suffix = ($count % 100 > 4 && $count % 100 < 20) ? 5 : $suffixes[min($count % 10, 5)];
return Loc::getMessage("CRM_REPORT_REGULAR_CUSTOMERS_DEALS_COUNT_EXACT_" . $suffix, [
"#COUNT#" => $count
]);
}
else if ($max == 0)
{
return Loc::getMessage("CRM_REPORT_REGULAR_CUSTOMERS_DEAL_COUNT_MORE", [
"#COUNT#" => $min
]);
}
else
{
return Loc::getMessage("CRM_REPORT_REGULAR_CUSTOMERS_DEAL_COUNT_BETWEEN", [
"#COUNT_FROM#" => $min,
"#COUNT_TO#" => $max,
]);
}
}