• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/basketitem.php
  • Класс: BitrixSaleBasketItem
  • Вызов: BasketItem::formatQuantity
static function formatQuantity($quantity)
{
	$format = ConfigOption::get('sale', 'format_quantity', 'AUTO');
	if ($format == 'AUTO' || intval($format) <= 0)
	{
		$quantity = round($quantity, SALE_VALUE_PRECISION);
	}
	else
	{
		$quantity = number_format($quantity, intval($format), '.', '');
	}

	return $quantity;
}