[Vtigercrm-commits] [vtiger development] #7372: Related contact address not updated when related account address change

vtiger development vtiger-tickets at trac.vtiger.com
Thu Mar 8 08:06:47 PST 2012


#7372: Related contact address not updated when related account address change
-----------------------+----------------------------------------------------
 Reporter:  dubwise    |       Owner:  developer 
     Type:  defect     |      Status:  new       
 Priority:  critical   |   Milestone:  Unassigned
Component:  vtigercrm  |     Version:  5.3.0     
 Severity:  Medium     |    Keywords:            
-----------------------+----------------------------------------------------
 According to the code found on /modules/Account/Save.php, around line 91
 there is this function :

 {{{
    //When changing the Account Address Information  it should also change
 the related contact address - dina
     if($focus->mode == 'edit' && $_REQUEST['address_change'] == 'yes')
     {
        $query = "update vtiger_contactaddress set
 mailingcity=?,mailingstreet=?,mailingcountry=?,mailingzip=?,mailingpobox=?,mailingstate=?,othercountry=?,othercity=?,otherstate=?,otherzip=?,otherstreet=?,otherpobox=?
 where contactaddressid in (select contactid from vtiger_contactdetails
 where accountid=?)" ;
         $params = array($focus->column_fields['bill_city'],
 $focus->column_fields['bill_street'],
 $focus->column_fields['bill_country'],
                 $focus->column_fields['bill_code'],
 $focus->column_fields['bill_pobox'], $focus->column_fields['bill_state'],
 $focus->column_fields['ship_country'],
                 $focus->column_fields['ship_city'],
 $focus->column_fields['ship_state'], $focus->column_fields['ship_code'],
 $focus->column_fields['ship_street'],
                 $focus->column_fields['ship_pobox'], $focus->id);
        $adb->pquery($query, $params);
     }
     //Changing account address - Ends

 }}}


 It's not working, address fields are well populated when you create a
 contact and set the related account, but later if you change anything
 (using full edit mode) in the account address then the related contact
 address is simply not updated.

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7372>
vtiger development <http://trac.vtiger.com/>
vtiger CRM



More information about the vtigercrm-commits mailing list