Fehlender alter hidden wert für preisfaktor.
[kivitendo-erp.git] / bin / mozilla / cp.pl
index c6a6152..7daa888 100644 (file)
@@ -73,7 +73,7 @@ sub payment {
   $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" }
@@ -137,7 +137,7 @@ sub form_header {
 
   # 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};
   }