• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/grid/column/productprovider.php
  • Класс: BitrixCatalogGridColumnProductProvider
  • Вызов: ProductProvider::needSummaryStoreAmountByPermissions
static function needSummaryStoreAmountByPermissions(): bool
{
	if (!Loader::includeModule('crm'))
	{
		return false;
	}

	if (!CatalogConfigState::isUsedInventoryManagement())
	{
		return false;
	}

	$allowedStores = AccessAccessController::getCurrent()->getPermissionValue(
		AccessActionDictionary::ACTION_STORE_VIEW
	);
	if (
		is_array($allowedStores)
		&& in_array(AccessPermissionPermissionDictionary::VALUE_VARIATION_ALL, $allowedStores, true)
	)
	{
		return false;
	}

	return true;
}