- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/binding/quotecontact.php
- Класс: Bitrix\Crm\Binding\QuoteContactTable
- Вызов: QuoteContactTable::getQuoteBindings
static function getQuoteBindings($quoteID)
{
$quoteID = (int)$quoteID;
if($quoteID <= 0)
{
throw new Main\ArgumentException('Must be greater than zero', 'quoteID');
}
$dbResult = Main\Application::getConnection()->query(
/** @lang text*/
"SELECT CONTACT_ID, SORT, ROLE_ID, IS_PRIMARY FROM b_crm_quote_contact WHERE QUOTE_ID = {$quoteID} ORDER BY SORT"
);
$results = array();
while($ary = $dbResult->fetch())
{
$results[] = array(
'CONTACT_ID' => (int)$ary['CONTACT_ID'],
'SORT' => (int)$ary['SORT'],
'ROLE_ID' => (int)$ary['ROLE_ID'],
'IS_PRIMARY' => $ary['IS_PRIMARY']
);
}
return $results;
}