本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}