$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
$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";
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>
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>