• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/tree.php
  • Класс: BitrixSaleLocationTree
  • Вызов: Tree::getMaxMargin
static function getMaxMargin()
{
	$tableName = static::getTableName();

	// todo: write it in orm way
	$res = MainHttpApplication::getConnection()->query("select A.RIGHT_MARGIN from {$tableName} A order by A.RIGHT_MARGIN desc")->fetch();
	return intval($res['RIGHT_MARGIN']);
}