...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/binding/orderpaymentstagetable.php
- Класс: Bitrix\Crm\Binding\represents
- Вызов: represents::setStage
static function setStage(int $paymentId, string $stage) { $row = static::getById($paymentId)->fetch(); if ($row) { if ($row['STAGE'] !== $stage) { return static::update($paymentId, ['STAGE' => $stage]); } else { return null; } } else { return static::add([ 'PAYMENT_ID' => $paymentId, 'STAGE' => $stage, ]); } }