• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/internals/discount.php
  • Класс: BitrixSaleInternalsDiscountTable
  • Вызов: DiscountTable::onDelete
static function onDelete(MainEntityEvent $event)
{
	$id = $event->getParameter('primary');
	$id = $id['ID'];
	$discount = self::getList(array(
		'select' => array('ID', 'USE_COUPONS'),
		'filter' => array('=ID' => $id)
	))->fetch();
	if (!empty($discount))
	{
		if ((string)$discount['USE_COUPONS'] === 'Y')
			self::$deleteCoupons = $discount['ID'];
	}
	unset($discount, $id);
}