Anpassung an check_right_number_format und check_right_date_format aus der common.js
[kivitendo-erp.git] / bin / mozilla / ic.pl
index 0a21785..61a820b 100644 (file)
@@ -747,20 +747,9 @@ sub choice {
 sub list {
   $lxdebug->enter_sub();
 
-  # get parts for
-  if (($form->{partnumber} eq "") and ($form->{description} eq "")) {
-    IC->get_parts(\%myconfig, \%$form, "");
-  } else {
-    if ((!($form->{partnumber} eq "")) and ($form->{description} eq "")) {
-      IC->get_parts(\%myconfig, \%$form, "partnumber");
-    } else {
-      if (($form->{partnumber} eq "") and (!($form->{description} eq ""))) {
-        IC->get_parts(\%myconfig, \%$form, "description");
-      } else {
-        IC->get_parts(\%myconfig, \%$form, "all");
-      }    #fi
-    }    #fi
-  }    #fi
+  my @sortorders = ("", "partnumber", "description", "all");
+  my $sortorder = $sortorders[($form->{description} ? 2 : 0) + ($form->{partnumber} ? 1 : 0)];
+  IC->get_parts(\%myconfig, \%$form, $sortorder);
 
   $form->{title} = $locale->text('Top 100 hinzufuegen');
 
@@ -2409,7 +2398,7 @@ sub form_header {
              </tr>
               <tr>
                <th align="right" nowrap="true">|
-      . $locale->text('Geschäftsvolumen') . qq|</th>
+      . $locale->text('Geschäftsvolumen') . qq|</th>
                <td><input name=gv size=10 value=$form->{gv}></td>
              </tr>
 |;
@@ -3000,8 +2989,8 @@ sub update {
   }
 
   if ($form->{item} eq 'service') {
-    map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
-      qw(sellprice listprice);
+    map({ $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+        qw(sellprice listprice lastcost));
     &form_header;
     &price_row;
     &form_footer;