- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
- Класс: \CAllCrmDeal
- Вызов: CAllCrmDeal::addProductRows
static function addProductRows(
int $ID,
array $newRows,
array $options = [],
$checkPerms = true,
$regEvent = true,
$syncOwner = true
)
{
$rows = self::LoadProductRows($ID);
if (!is_array($rows))
{
return false;
}
$sort = self::getMaxProductDealSort($rows);
foreach ($newRows as $newRow)
{
$sort += 10;
$newRow['SORT'] = $sort;
$rows[] = $newRow;
}
return \CCrmDeal::SaveProductRows($ID, $rows, $checkPerms, $regEvent, $syncOwner);
}