Bugfix Tabindex in Kundenerfassenmaske fuer Preisgruppe
[kivitendo-erp.git] / bin / mozilla / ct.pl
index aa8459d..fc260c6 100644 (file)
@@ -463,6 +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});
 
   if ($myconfig{role} eq 'admin') {
     $bcc = qq|
@@ -611,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>|;
 
     }
   }
@@ -646,7 +648,7 @@ sub form_header {
        </tr>
        <tr>
          <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
-         <td><input name=name size=35 maxlength=35 tabindex=1 value="$form->{name}"></td>
+         <td><input name=name size=35 maxlength=75 tabindex=1 value="$form->{name}"></td>
          <td><input name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td>
        </tr>
        <tr>
@@ -659,7 +661,7 @@ sub form_header {
        <tr>
          <th align=right nowrap>| . $locale->text('Street') . qq|</th>
          <td><input name=street size=35 tabindex=4 maxlength=75 value="$form->{street}"></td>
-         <td><input name=shiptostreet size=35 maxlength=35 value="$form->{shiptostreet}"></td>
+         <td><input name=shiptostreet size=35 maxlength=75 value="$form->{shiptostreet}"></td>
        </tr>
        <tr>
          <th align=right nowrap>|
@@ -975,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();