Метод getNotEmptyDealCondition

private

Сигнатура метода

private function getNotEmptyDealCondition(Query $query): ConditionTree

Возвращает: ConditionTree

Описание

A deal with neither product rows nor a sum is not a purchase, so it is not a base deal either. The condition is the one deals are kept by, so the "no rows AND no sum" of the rule stands here as its negation: a sum of its own, or rows of their own, is enough to stay. An unfilled OPPORTUNITY is a zero one: `<> 0` is unknown for NULL and leaves such a deal out on its own. The sum is checked first, so the subquery over the product rows runs for the deals of zero sum only. The subquery correlates through the alias of the outer query, baked into the SQL as a string: nesting that query into another one would break the correlation.

Параметры

1
Имя Тип По умолчанию Флаги
$query Query —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/RepeatSale/Segment/Collector/Ai/DealsProvider.php
Расположение метода в файле
Строки 74–87

Исходный код

PHP