[Vtigercrm-commits] [vtiger-commits] r11146 - in /vtigercrm/branches/5.0.3/modules: Accounts/Accounts.php Accounts/AddressChange.php Import/UsersLastImport.php Leads/LeadConvertToEntities.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 30 02:13:46 EDT 2007


Author: jerrydgeorge
Date: Wed May 30 00:13:31 2007
New Revision: 11146

Log:
Issues Due to the renaming of the Address fields for the Account Module has been Fixed

Modified:
    vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php
    vtigercrm/branches/5.0.3/modules/Accounts/AddressChange.php
    vtigercrm/branches/5.0.3/modules/Import/UsersLastImport.php
    vtigercrm/branches/5.0.3/modules/Leads/LeadConvertToEntities.php

Modified: vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php Wed May 30 00:13:31 2007
@@ -46,14 +46,14 @@
 
 	var $column_fields = Array();
 
-	var $sortby_fields = Array('accountname','city','website','phone','smownerid');		
+	var $sortby_fields = Array('accountname','bill_city','website','phone','smownerid');		
 
 	var $groupTable = Array('vtiger_accountgrouprelation','accountid');
 	
 	// This is the list of vtiger_fields that are in the lists.
 	var $list_fields = Array(
 			'Account Name'=>Array('vtiger_account'=>'accountname'),
-			'City'=>Array('vtiger_accountbillads'=>'city'), 
+			'City'=>Array('vtiger_accountbillads'=>'bill_city'), 
 			'Website'=>Array('vtiger_account'=>'website'),
 			'Phone'=>Array('vtiger_account'=> 'phone'),
 			'Assigned To'=>Array('vtiger_crmentity'=>'smownerid')
@@ -70,7 +70,7 @@
 
 	var $search_fields = Array(
 			'Account Name'=>Array('vtiger_account'=>'accountname'),
-			'City'=>Array('vtiger_accountbillads'=>'city'), 
+			'City'=>Array('vtiger_accountbillads'=>'bill_city'), 
 			);
 
 	var $search_fields_name = Array(

Modified: vtigercrm/branches/5.0.3/modules/Accounts/AddressChange.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/AddressChange.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/AddressChange.php Wed May 30 00:13:31 2007
@@ -18,7 +18,7 @@
 global $log;
 //When changing the Account Address Information  it should also change the related contact address --Dinakaran
 $record = $_REQUEST['record'];
-$sql ="select vtiger_account.accountid,vtiger_accountbillads.street as billingstreet, vtiger_accountbillads.city as billingcity,vtiger_accountbillads.code as billingcode,vtiger_accountbillads.country as billingcountry,vtiger_accountbillads.state as billingstate,vtiger_accountbillads.pobox as billingpobox ,vtiger_accountshipads.* from vtiger_account inner join vtiger_accountbillads on vtiger_accountbillads.accountaddressid=vtiger_account.accountid inner join vtiger_accountshipads on vtiger_accountshipads.accountaddressid = vtiger_account.accountid where accountid=".$record;
+$sql ="select vtiger_account.accountid,vtiger_accountbillads.bill_street as billingstreet, vtiger_accountbillads.bill_city as billingcity,vtiger_accountbillads.bill_code as billingcode,vtiger_accountbillads.bill_country as billingcountry,vtiger_accountbillads.bill_state as billingstate,vtiger_accountbillads.bill_pobox as billingpobox ,vtiger_accountshipads.* from vtiger_account inner join vtiger_accountbillads on vtiger_accountbillads.accountaddressid=vtiger_account.accountid inner join vtiger_accountshipads on vtiger_accountshipads.accountaddressid = vtiger_account.accountid where accountid=".$record;
 //$sql ="select vtiger_account.accountid,vtiger_accountbillads.* ,vtiger_accountshipads.* from vtiger_accountbillads,vtiger_accountshipads,vtiger_account where accountid =".$record;
 $result = $adb->query($sql);
 $value = $adb->fetch_row($result);
@@ -29,12 +29,12 @@
  ($_REQUEST['bill_code']!=$value['billingcode'] && isset($_REQUEST['bill_code']))||
  ($_REQUEST['bill_pobox']!=$value['billingpobox'] && isset($_REQUEST['bill_pobox'])) || 
  ($_REQUEST['bill_state']!=$value['billingstate'] && isset($_REQUEST['bill_state']))||
- ($_REQUEST['ship_country']!=$value['country'] && isset($_REQUEST['ship_country']))|| 
- ($_REQUEST['ship_city']!=$value['city'] && isset($_REQUEST['ship_city']))||
- ($_REQUEST['ship_state']!=$value['state'] && isset($_REQUEST['ship_state']))||
- ($_REQUEST['ship_code']!=$value['code'] && isset($_REQUEST['ship_code']))||
- ($_REQUEST['ship_street']!=$value['street'] && isset($_REQUEST['ship_street']))|| 
- ($_REQUEST['ship_pobox']!=$value['pobox'] && isset($_REQUEST['ship_pobox'])))
+ ($_REQUEST['ship_country']!=$value['ship_country'] && isset($_REQUEST['ship_country']))|| 
+ ($_REQUEST['ship_city']!=$value['ship_city'] && isset($_REQUEST['ship_city']))||
+ ($_REQUEST['ship_state']!=$value['ship_state'] && isset($_REQUEST['ship_state']))||
+ ($_REQUEST['ship_code']!=$value['ship_code'] && isset($_REQUEST['ship_code']))||
+ ($_REQUEST['ship_street']!=$value['ship_street'] && isset($_REQUEST['ship_street']))|| 
+ ($_REQUEST['ship_pobox']!=$value['ship_pobox'] && isset($_REQUEST['ship_pobox'])))
 {
 	$sql1="select contactid from vtiger_contactdetails where accountid=".$record;
 	$result1 = $adb->query($sql1);

Modified: vtigercrm/branches/5.0.3/modules/Import/UsersLastImport.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Import/UsersLastImport.php (original)
+++ vtigercrm/branches/5.0.3/modules/Import/UsersLastImport.php Wed May 30 00:13:31 2007
@@ -112,7 +112,7 @@
 		} 
 		else if ($this->bean_type == 'Accounts')
 		{
-				$query = "SELECT distinct vtiger_account.*, vtiger_accountbillads.city,
+				$query = "SELECT distinct vtiger_account.*, vtiger_accountbillads.bill_city,
                                 vtiger_users.user_name user_name,
 				crmid, smownerid 
 				FROM vtiger_account

Modified: vtigercrm/branches/5.0.3/modules/Leads/LeadConvertToEntities.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Leads/LeadConvertToEntities.php (original)
+++ vtigercrm/branches/5.0.3/modules/Leads/LeadConvertToEntities.php Wed May 30 00:13:31 2007
@@ -336,10 +336,10 @@
 	/* Modified by Minnie -- END*/
 	$adb->query($sql_insert_account);
 
-	$sql_insert_accountbillads = "INSERT INTO vtiger_accountbillads (accountaddressid,city,code,country,state,street,pobox) VALUES (".$crmid.",'".$row["city"] ."','" .$row["code"] ."','" .$row["country"] ."','".$row["state"] ."','" .$row["lane"]."','".$row["pobox"]."')";
+	$sql_insert_accountbillads = "INSERT INTO vtiger_accountbillads (accountaddressid,bill_city,bill_code,bill_country,bill_state,bill_street,bill_pobox) VALUES (".$crmid.",'".$row["city"] ."','" .$row["code"] ."','" .$row["country"] ."','".$row["state"] ."','" .$row["lane"]."','".$row["pobox"]."')";
 	$adb->query($sql_insert_accountbillads);
 
-	$sql_insert_accountshipads = "INSERT INTO vtiger_accountshipads (accountaddressid,city,code,country,pobox,state,street) VALUES (".$crmid.",'".$row["city"] ."','" .$row["code"] ."','" .$row["country"] ."','".$row["pobox"]."','".$row["state"] ."','" .$row["lane"]."')";
+	$sql_insert_accountshipads = "INSERT INTO vtiger_accountshipads (accountaddressid,ship_city,ship_code,ship_country,ship_pobox,ship_state,ship_street) VALUES (".$crmid.",'".$row["city"] ."','" .$row["code"] ."','" .$row["country"] ."','".$row["pobox"]."','".$row["state"] ."','" .$row["lane"]."')";
 	$adb->query($sql_insert_accountshipads);
 
 	//Getting the custom vtiger_field values from leads and inserting into Accounts if the vtiger_field is mapped - Jaguar





More information about the vtigercrm-commits mailing list