function fn_spsr_delete_courier($id, $owner_id) { RusSpsr::WALogin(); $result = RusSpsr::WACancelOrder($id, $owner_id); $save = array('courier_key' => '', 'courier_id' => '', 'courier_owner_id' => ''); db_query('UPDATE ?:rus_spsr_invoices SET ?u WHERE courier_id = ?i AND courier_owner_id = ?i', $save, $id, $owner_id); if ($result) { fn_set_notification('N', __('notice'), __('shippings.spsr.order_delete') . ' : ' . $result['order'] . ' ' . $result['order_state']); } else { fn_set_notification('E', __('notice'), __('shippings.spsr.not_order_delete') . ' : ' . RusSpsr::$last_error); } RusSpsr::WALogout(); }