CurrentLightTimeUncompleted::applyFilter

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CurrentLightTimeUncompleted
  4. applyFilter
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/counterquerybuilder/deadlinebased/datefilters/currentlighttimeuncompleted.php
  • Класс: Bitrix\Crm\Counter\CounterQueryBuilder\DeadlineBased\DateFilters\CurrentLightTimeUncompleted
  • Вызов: CurrentLightTimeUncompleted::applyFilter
public function applyFilter(ConditionTree $ct, QueryParams $params): void
{
	$beginOfCurrDay = Dates::beginOfCurrentDay($params);
	$now = Dates::now($params);

	$groupCt = new ConditionTree();
	$groupCt->logic(ConditionTree::LOGIC_OR);

	$groupCt->addCondition(
		(new ConditionTree())->where('ref.MIN_DEADLINE', '<', $beginOfCurrDay)
	);
	$groupCt->addCondition(
		(new ConditionTree())->where('ref.MIN_LIGHT_COUNTER_AT', '<=', $now)
	);

	$ct->addCondition($groupCt);

	if ($params->periodFrom() && $params->periodTo())
	{
		$this->deadlineBounds->applyFilerToField('ref.MIN_DEADLINE', $ct, $params);
	}
}

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