Bugfix zu Bug 789: Ansprechpartner zeigen jetzt auch den Vornamen an
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 4 Feb 2008 16:37:56 +0000 (16:37 +0000)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 4 Feb 2008 16:37:56 +0000 (16:37 +0000)
SL/CT.pm
bin/mozilla/ct.pl
templates/webpages/ct/form_header_de.html
templates/webpages/ct/form_header_master.html

index 7ccccad..e25e41c 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -160,7 +160,7 @@ sub populate_drop_down_boxes {
   $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $form->{id});
 
   # get contacts
-  $query  = qq|SELECT cp_id, cp_name FROM contacts WHERE cp_cv_id = ?|;
+  $query  = qq|SELECT cp_id, cp_name, cp_givenname FROM contacts WHERE cp_cv_id = ?|;
   $form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $form->{id});
 
   # get languages
index bc4f428..76d9fb7 100644 (file)
@@ -267,6 +267,7 @@ sub form_header {
   $form->{is_customer}    = $form->{db}     eq 'customer';
   $form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} };
   $form->{shipto_label}   = sub { "$_[0]->{shiptoname} $_[0]->{shiptodepartment_1}" };
+  $form->{contacts_label} = sub { "$_[0]->{cp_givenname} $_[0]->{cp_name}" };
   $form->{taxzone_id}     = 0                                                               if !$form->{id};
   $form->{jsscript}       = 1;
   $form->{fokus}          = "ct.greeting";
index 99cc455..d622913 100644 (file)
              DATA       = CONTACTS,
              onChange   = "get_contact(['cp_id__' + this.value], ['cp_name', 'cp_greeting', 'cp_title', 'cp_givenname', 'cp_phone1', 'cp_phone2', 'cp_email', 'cp_abteilung', 'cp_fax', 'cp_mobile1', 'cp_mobile2', 'cp_satphone', 'cp_satfax', 'cp_project', 'cp_privatphone', 'cp_privatemail', 'cp_birthday'])",
              id_key     = 'cp_id',
-             label_key  = 'cp_name',
+             label_sub  = 'contacts_label',
        -%]
       </td>
      </tr>
index ea2fbc3..fdb122b 100644 (file)
              DATA       = CONTACTS,
              onChange   = "get_contact(['cp_id__' + this.value], ['cp_name', 'cp_greeting', 'cp_title', 'cp_givenname', 'cp_phone1', 'cp_phone2', 'cp_email', 'cp_abteilung', 'cp_fax', 'cp_mobile1', 'cp_mobile2', 'cp_satphone', 'cp_satfax', 'cp_project', 'cp_privatphone', 'cp_privatemail', 'cp_birthday'])",
              id_key     = 'cp_id',
-             label_key  = 'cp_name',
+             label_sub  = 'contacts_label',
        -%]
       </td>
      </tr>