• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory/SmartInvoice.php
  • Класс: Bitrix\Crm\Service\Factory\SmartInvoice
  • Вызов: SmartInvoice::checkSmartInvoiceTableExists
private function checkSmartInvoiceTableExists(): bool
{
	global $DB;
	$cache = \Bitrix\Main\Application::getInstance()->getManagedCache();
	$cacheKey = 'crm_check__b_crm_dynamic_items_31__table';

	if ($cache->read(3600*24*7, $cacheKey))
	{
		$hasTable = (bool)$cache->get($cacheKey);
	}
	else
	{
		$hasTable = (bool)$DB->TableExists('b_crm_dynamic_items_31');
		$cache->set($cacheKey, $hasTable);
	}

	return $hasTable;
}