當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRMEntity::unlinkRelationship方法代碼示例

本文整理匯總了PHP中CRMEntity::unlinkRelationship方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRMEntity::unlinkRelationship方法的具體用法?PHP CRMEntity::unlinkRelationship怎麽用?PHP CRMEntity::unlinkRelationship使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRMEntity的用法示例。


在下文中一共展示了CRMEntity::unlinkRelationship方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts') {
         $this->trash($this->module_name, $id);
     } elseif ($return_module == 'Campaigns') {
         $sql = 'UPDATE vtiger_potential SET campaignid = ? WHERE potentialid = ?';
         $this->db->pquery($sql, array(null, $id));
     } elseif ($return_module == 'Products') {
         $sql = 'DELETE FROM vtiger_seproductsrel WHERE crmid=? AND productid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Contacts') {
         $sql = 'DELETE FROM vtiger_contpotentialrel WHERE potentialid=? AND contactid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:21,代碼來源:Potentials.php

示例2: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts' || $return_module == 'Contacts') {
         $this->trash('Invoice', $id);
     } elseif ($return_module == 'SalesOrder') {
         $relation_query = 'UPDATE vtiger_invoice set salesorderid=? where invoiceid=?';
         $this->db->pquery($relation_query, array(null, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:15,代碼來源:Invoice.php

示例3: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts') {
         $sql = 'UPDATE vtiger_contactdetails SET parentid = ? WHERE contactid = ?';
         $this->db->pquery($sql, array(null, $id));
     } elseif ($return_module == 'Potentials') {
         $sql = 'DELETE FROM vtiger_contpotentialrel WHERE contactid=? AND potentialid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Campaigns') {
         $sql = 'DELETE FROM vtiger_campaigncontrel WHERE contactid=? AND campaignid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Products') {
         $sql = 'DELETE FROM vtiger_seproductsrel WHERE crmid=? AND productid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Vendors') {
         $sql = 'DELETE FROM vtiger_vendorcontactrel WHERE vendorid=? AND contactid=?';
         $this->db->pquery($sql, array($return_id, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:25,代碼來源:Contacts.php

示例4: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Campaigns') {
         $sql = 'DELETE FROM vtiger_campaignleadrel WHERE leadid=? AND campaignid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Products') {
         $sql = 'DELETE FROM vtiger_seproductsrel WHERE crmid=? AND productid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:16,代碼來源:Leads.php

示例5: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     global $adb;
     parent::unlinkRelationship($id, $return_module, $return_id);
     $rs = $adb->pquery("select related_id,parent_id from vtiger_cobropago where cobropagoid=?", array($id));
     if ($rs and $adb->num_rows($rs) == 1) {
         $relatedId = $adb->query_result($rs, 0, 'related_id');
         $pid = $adb->query_result($rs, 0, 'parent_id');
         if (!empty($relatedId) and self::invoice_control_installed()) {
             Invoice::updateAmountDue($relatedId);
         }
         // Calculate related module balance
         CobroPago::calculateRelatedTotals($pid);
     }
 }
開發者ID:jaimeaga84,項目名稱:corebos,代碼行數:15,代碼來源:CobroPago.php

示例6: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts' || $return_module == 'Contacts') {
         $sql_req = 'UPDATE vtiger_calculations SET relatedid=? WHERE calculationsid = ?';
         $this->db->pquery($sql_req, array(null, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:13,代碼來源:Calculations.php

示例7: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Leads') {
         $sql = 'DELETE FROM vtiger_campaignleadrel WHERE campaignid=? AND leadid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Contacts') {
         $sql = 'DELETE FROM vtiger_campaigncontrel WHERE campaignid=? AND contactid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Accounts') {
         $sql = 'DELETE FROM vtiger_campaignaccountrel WHERE campaignid=? AND accountid=?';
         $this->db->pquery($sql, array($id, $return_id));
         $sql = 'DELETE FROM vtiger_campaigncontrel WHERE campaignid=? AND contactid IN (SELECT contactid FROM vtiger_contactdetails WHERE accountid=?)';
         $this->db->pquery($sql, array($id, $return_id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:21,代碼來源:Campaigns.php

示例8: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     global $log;
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Contacts') {
         $sql = 'DELETE FROM vtiger_vendorcontactrel WHERE vendorid=? AND contactid=?';
         $this->db->pquery($sql, array($id, $return_id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:kduqi,項目名稱:corebos,代碼行數:13,代碼來源:Vendors.php

示例9: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts') {
         $sql = 'UPDATE vtiger_troubletickets SET parent_id=? WHERE ticketid=?';
         $this->db->pquery($sql, array(null, $id));
         $se_sql = 'DELETE FROM vtiger_seticketsrel WHERE ticketid=?';
         $this->db->pquery($se_sql, array($id));
     } elseif ($return_module == 'Contacts') {
         $sql = 'UPDATE vtiger_troubletickets SET contact_id=? WHERE ticketid=?';
         $this->db->pquery($sql, array(null, $id));
         $se_sql = 'DELETE FROM vtiger_seticketsrel WHERE ticketid=?';
         $this->db->pquery($se_sql, array($id));
     } elseif ($return_module == 'Products') {
         $sql = 'UPDATE vtiger_troubletickets SET product_id=? WHERE ticketid=?';
         $this->db->pquery($sql, array(null, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:HoererUndFlamme,項目名稱:YetiForceCRM,代碼行數:23,代碼來源:HelpDesk.php

示例10: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts') {
         $this->trash('SalesOrder', $id);
     } elseif ($return_module == 'Quotes') {
         $relation_query = 'UPDATE vtiger_salesorder SET quoteid=? WHERE salesorderid=?';
         $this->db->pquery($relation_query, array(null, $id));
     } elseif ($return_module == 'Potentials') {
         $relation_query = 'UPDATE vtiger_salesorder SET potentialid=? WHERE salesorderid=?';
         $this->db->pquery($relation_query, array(null, $id));
     } elseif ($return_module == 'Contacts') {
         $relation_query = 'UPDATE vtiger_salesorder SET contactid=? WHERE salesorderid=?';
         $this->db->pquery($relation_query, array(null, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:21,代碼來源:SalesOrder.php

示例11: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Leads' || $return_module == 'Contacts') {
         $sql = 'DELETE FROM vtiger_seproductsrel WHERE productid = ? AND crmid = ?';
         $this->db->pquery($sql, array($id, $return_id));
     } elseif ($return_module == 'Vendors') {
         $sql = 'UPDATE vtiger_products SET vendor_id = ? WHERE productid = ?';
         $this->db->pquery($sql, array(null, $id));
     } elseif ($return_module == 'Accounts') {
         $sql = 'DELETE FROM vtiger_seproductsrel WHERE productid = ? AND (crmid = ? OR crmid IN (SELECT contactid FROM vtiger_contactdetails WHERE parentid=?))';
         $param = array($id, $return_id, $return_id);
         $this->db->pquery($sql, $param);
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:nikdejan,項目名稱:YetiForceCRM,代碼行數:20,代碼來源:Products.php

示例12: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Accounts' || $return_module == 'Contacts' || $return_module == 'Vendors') {
         $sql_req = 'UPDATE vtiger_osscosts SET relategid=? WHERE osscostsid = ?';
         $this->db->pquery($sql_req, array(null, $id));
     } elseif ($return_module == 'Potentials') {
         $sql_req = 'UPDATE vtiger_osscosts SET potentialid=? WHERE osscostsid = ?';
         $this->db->pquery($sql_req, array(null, $id));
     } elseif ($return_module == 'HelpDesk') {
         $sql_req = 'UPDATE vtiger_osscosts SET ticketid=? WHERE osscostsid = ?';
         $this->db->pquery($sql_req, array(null, $id));
     } elseif ($return_module == 'Project') {
         $sql_req = 'UPDATE vtiger_osscosts SET projectid=? WHERE osscostsid = ?';
         $this->db->pquery($sql_req, array(null, $id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:22,代碼來源:OSSCosts.php

示例13: unlinkRelationship

 function unlinkRelationship($id, $return_module, $return_id)
 {
     $log = vglobal('log');
     if (empty($return_module) || empty($return_id)) {
         return;
     }
     if ($return_module == 'Vendors') {
         $sql_req = 'UPDATE vtiger_crmentity SET deleted = 1 WHERE crmid= ?';
         $this->db->pquery($sql_req, array($id));
     } else {
         parent::unlinkRelationship($id, $return_module, $return_id);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:13,代碼來源:PurchaseOrder.php


注:本文中的CRMEntity::unlinkRelationship方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。