$form->{"select$form->{vc}"} = "";
if ($form->{"all_$form->{vc}"}) {
- $form->{"select$form->{vc}"} .= "<option value=\"\"></option>\n";
+ $form->{"select$form->{vc}"} .= "<option value=\"\"></option>\n";
# s.o. jb 12.10.2010
$form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
map { $form->{"select$form->{vc}"} .= "<option value=\"$_->{name}--$_->{id}\">$_->{name}--$_->{id}</option>\n" }
# sometimes it happens that values in customer arrive without the signs '--'
# but in order to select the right option field we need values with '--'
- if ($form->{vc} eq "customer"){
+ if ($form->{vc} eq "customer" && $form->{"all_$form->{vc}"}){
my ($customername) = split /--/, $form->{ $form->{vc} };
$form->{ $form->{vc} } = $customername . "--" . $form->{customer_id};
}