/** @deprecated */ public static function Reset($sid) { $dbRes = \Bitrix\Sale\Delivery\Services\Table::getList(array("filter" => array("LOGIC" => "OR", "=CODE" => $sid, "CODE" => $sid . ":%"), "select" => array("ID"))); try { while ($service = $dbRes->fetch()) { \Bitrix\Sale\Delivery\Services\Manager::delete($service["ID"]); } } catch (\Bitrix\Main\SystemException $e) { $GLOBALS["APPLICATION"]->ThrowException($e->getMessage()); return false; } return true; }
/** * @deprecated */ public static function Delete($ID) { $newId = \CSaleDelivery::getIdByCode($ID); try { $res = \Bitrix\Sale\Delivery\Services\Manager::delete($newId); } catch (\Bitrix\Main\SystemException $e) { $GLOBALS["APPLICATION"]->ThrowException($e->getMessage()); return false; } return new CDBResult($res); }