DealIdle::prepareHistoryQuery

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. DealIdle
  4. prepareHistoryQuery
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/widget/data/dealidle.php
  • Класс: Bitrix\Crm\Widget\Data\DealIdle
  • Вызов: DealIdle::prepareHistoryQuery
static function prepareHistoryQuery($startDate, $endDate, $typeID, $ownerFieldReference = '%s', $postfix = '')
{
	$query = new Query(DealStageHistoryTable::getEntity());
	if($postfix !== '')
	{
		$query->setTableAliasPostfix($postfix);
	}
	$query->addFilter('=TYPE_ID', $typeID);
	$query->addFilter('>=CREATED_DATE', $startDate);
	$query->addFilter('<=CREATED_DATE', $endDate);
	$query->addFilter('=OWNER_ID', new SqlExpression($ownerFieldReference));
	if(!(Main\Application::getConnection() instanceof Main\DB\OracleConnection))
	{
		$query->setLimit(1);
	}

	return $query;
}

Добавить комментарий