Ejemplo n.º 1
0
 /** @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;
 }
Ejemplo n.º 2
0
 /**
  * @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);
 }