Results 1 to 2 of 2

Thread: Display Salutation with Name (Quotes)

  1. #1
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Default Display Salutation with Name (Quotes)

    In the quotes module our contact's names are being displayed (both in DetailView and ListView) as
    FirstName LastName (billing_contact_name and shipping_contact_name)
    e.g. John Smith
    which is great if you know the first name of the customer, but if we do not know the name of the user (even if we know the first name), we would like to display and print the contact's name as
    Salutation FirstName LastName
    Mr. John Smith

    Any ideas what I have to change this to get it to work?

    5.1.0c (Build 4979) Professional

    Thanks in advance
    Chad (beuten)
    DAXTEN
    www.daxten.com

  2. #2
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Default Re: Display Salutation with Name (Quotes)

    Hear is the solution (Bug # 11253, http://bugs.sugarcrm.com?bug_number=11253):

    1) Add con.salutation to the following query:

    $query = "SELECT con.first_name, con.last_name, con.assigned_user_id contact_name_owner, con.id, c_q.contact_role from $this->contact_table con, $this->rel_contact_table c_q where con.id = c_q.contact_id and c_q.quote_id = '$this->id' and c_q.deleted=0 and con.deleted=0";

    so that it looks like this:

    $query = "SELECT con.salutation, con.first_name, con.last_name, con.assigned_user_id contact_name_owner, con.id, c_q.contact_role from $this->contact_table con, $this->rel_contact_table c_q where con.id = c_q.contact_id and c_q.quote_id = '$this->id' and c_q.deleted=0 and con.deleted=0";

    2) Add stripslashes($row['salutation'] to the $this statements for shipping_contact_name and billing_contact_name so that they look like the following:

    $this->shipping_contact_name = $locale->getLocaleFormattedName(stripslashes($row['first_name']), stripslashes($row['last_name']), stripslashes($row['salutation']));

    and

    $this->billing_contact_name = $locale->getLocaleFormattedName(stripslashes($row['first_name']), stripslashes($row['last_name']), stripslashes($row['salutation']));
    Chad (beuten)
    DAXTEN
    www.daxten.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Salutation for the employees
    By josephsartre in forum Help
    Replies: 0
    Last Post: 2007-08-08, 01:49 PM
  2. Salutation
    By hheckner in forum General Discussion
    Replies: 4
    Last Post: 2006-09-28, 06:53 AM
  3. Replies: 1
    Last Post: 2006-07-20, 04:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •