[Vtigercrm-commits] [vtiger-commits] r11058 - /vtigercrm/branches/5.0.3/include/utils/DeleteUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat May 26 08:42:41 EDT 2007


Author: richie
Date: Sat May 26 06:42:37 2007
New Revision: 11058

Log:
* Added query to delete the product-campaign relationship when we delete the product

Modified:
    vtigercrm/branches/5.0.3/include/utils/DeleteUtils.php

Modified: vtigercrm/branches/5.0.3/include/utils/DeleteUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/DeleteUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/DeleteUtils.php Sat May 26 06:42:37 2007
@@ -201,6 +201,8 @@
 			$sql = "update vtiger_products set vendor_id = null where productid = $record";
 			$adb->query($sql);
 		}
+		//we have to update the product_id as null for the campaigns which are related to this product
+		$adb->query("update vtiger_campaign set product_id=NULL where product_id = $record");
 	break;
 	case PurchaseOrder:
 
@@ -434,7 +436,6 @@
 	}*/
 	//Deleting Contact-Account Relation.
 	$con_q = "update vtiger_contactdetails set accountid = null where accountid = ".$record;
-	$con_res = $adb->query($con_q);
 	$adb->query($con_q);
 
 	//Deleting Trouble Tickets-Account Relation.





More information about the vtigercrm-commits mailing list