Bugfix Tabindex in Kundenerfassenmaske fuer Preisgruppe
[kivitendo-erp.git] / bin / mozilla / ct.pl
index d074a27..fc260c6 100644 (file)
@@ -463,8 +463,7 @@ sub form_header {
   $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
   $form->{creditlimit} =
     $form->format_amount(\%myconfig, $form->{creditlimit}, 0);
-  $form->{discount} =
-    $form->format_amount(\%myconfig, $form->{discount});
+  $form->{discount} = $form->format_amount(\%myconfig, $form->{discount});
 
   if ($myconfig{role} eq 'admin') {
     $bcc = qq|
@@ -613,7 +612,8 @@ sub form_header {
       $form->{selectpricegroup} =~
         s/(<option value="\Q$form->{klass}\E")/$1 selected/;
 
-      $pricegroup .= qq|<select name=klass>$form->{selectpricegroup}</select>|;
+      $pricegroup .=
+        qq|<select name=klass tabindex=24>$form->{selectpricegroup}</select>|;
 
     }
   }
@@ -977,8 +977,10 @@ sub save {
   if ($vertreter && $form->{db} eq "customer") {
     $form->isblank("salesman_id", $locale->text("Salesman missing!"));
   }
-  &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
-
+  $rc = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+  if ($rc == 3) {
+    $form->error($locale->text('customernumber not unique!'));
+  }
   $form->redirect($locale->text($msg));
 
   $lxdebug->leave_sub();