• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/invoice/internals/invoicediscount.php
  • Класс: Bitrix\Crm\Invoice\Internals\InvoiceDiscountDataTable
  • Вызов: InvoiceDiscountDataTable::clearByBasketItem
static function clearByBasketItem($basket)
{
	$basket = (int)$basket;
	if ($basket <= 0)
		return false;

	$conn = Main\Application::getConnection();
	$helper = $conn->getSqlHelper();
	$conn->queryExecute(
		'delete from '.$helper->quote(self::getTableName()).
		' where '.$helper->quote('ENTITY_TYPE').' = '.self::ENTITY_TYPE_BASKET_ITEM.
		' and '.$helper->quote('ENTITY_ID').' = '.$basket
	);
	unset($helper, $conn);
	return true;
}