BasketTable::deleteWithItems

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. BasketTable
  4. deleteWithItems
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/invoice/internals/basket.php
  • Класс: Bitrix\Crm\Invoice\Internals\BasketTable
  • Вызов: BasketTable::deleteWithItems
static function deleteWithItems($id)
{
	$id = intval($id);
	if ($id <= 0)
		throw new Main\ArgumentNullException("id");

	$itemsList = BasketPropertyTable::getList(
		array(
			"select" => array("ID"),
			"filter" => array("BASKET_ID" => $id),
		)
	);
	while ($item = $itemsList->fetch())
		BasketPropertyTable::delete($item["ID"]);

	return BasketTable::delete($id);
}

Добавить комментарий