...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/tracking/internals/phonenumber.php
- Класс: Bitrix\Crm\Tracking\Internals\PhoneNumberTable
- Вызов: PhoneNumberTable::appendNumber
static function appendNumber($value) { $row = static::getRow([ 'select' => ['ID'], 'filter' => ['=VALUE' => $value] ]); if ($row) { $result = static::update( $row['ID'], [ 'USE_CNT' => new DB\SqlExpression("?# + ?i", 'USE_CNT', 1), 'DATE_USE' => new DateTime() ] ); } else { $result = static::add([ 'VALUE' => $value, 'USE_CNT' => 1, 'DATE_USE' => new DateTime() ]); } return $result->isSuccess() ? $value : false; }