]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Einkaufs- und Verkaufsrechnungen: Filtermöglichkeiten nach Projektnummer sowie Anzeig...
[mfinanz.git] / SL / Form.pm
index f7cf1a86b192f091f9b29a85e92cef8d05fe988b..842afe8af1b2fabe1b2c8812b3ecbcdbceaf2079 100644 (file)
@@ -1451,8 +1451,16 @@ sub get_projects {
   if (!$all) {
     $where = "WHERE active ";
     if ($old_id) {
-      $where .= " OR (id = ?) ";
-      push(@values, $old_id);
+      if (ref($old_id) eq "ARRAY") {
+        my @ids = grep({ $_ } @{$old_id});
+        if (@ids) {
+          $where .= " OR id IN (" . join(",", map({ "?" } @ids)) . ") ";
+          push(@values, @ids);
+        }
+      } else {
+        $where .= " OR (id = ?) ";
+        push(@values, $old_id);
+      }
     }
   }