my @values = (undef);
foreach my $item (@{ $form->{"ALL_CONTACTS"} }) {
push(@values, $item->{"cp_id"});
- $labels{$item->{"cp_id"}} = $item->{"cp_name"} . ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : "");
+ $labels{$item->{"cp_id"}} = join(',', $item->{"cp_name"}, $item->{"cp_givenname"}) . ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : "");
}
my $contact;
if (scalar @values > 1) {
# label subs
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} };
$TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
- $TMPL_VAR{contact_labels} = sub { $_[0]->{"cp_name"} . ($_[0]->{cp_abteilung} ? " ($_[0]->{cp_abteilung})" : "") };
+ $TMPL_VAR{contact_labels} = sub { join(', ', $_[0]->{"cp_name"}, $_[0]->{"cp_givenname"}) . ($_[0]->{cp_abteilung} ? " ($_[0]->{cp_abteilung})" : "") };
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" };
# vendor/customer