]> wagnertech.de Git - mfinanz.git/blobdiff - SL/IC.pm
Änderungen für die Aufklappmenüs Forderungen und Verbindlichkeiten verhindern, ...
[mfinanz.git] / SL / IC.pm
index ee92278113ad60a171de30a2842fda31af3c0792..e3b33d7c7bdf77675e52c02b9df45a72cc8a10e5 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -702,16 +702,17 @@ sub assembly_item {
     push(@values, '%' . $form->{"${column}_$i"} . '%');
   }
 
-  if ($form->{"id_${i}"}) {
-    $where .= qq| AND p.id = ?|;
-    push @values, $form->{"id_${i}"};
-  }
-
   if ($form->{id}) {
     $where .= qq| AND NOT (p.id = ?)|;
     push(@values, conv_i($form->{id}));
   }
 
+  # Search for part ID overrides all other criteria.
+  if ($form->{"id_${i}"}) {
+    $where  = qq|p.id = ?|;
+    @values = ($form->{"id_${i}"});
+  }
+
   if ($form->{partnumber}) {
     $where .= qq| ORDER BY p.partnumber|;
   } else {
@@ -911,6 +912,12 @@ sub all_parts {
     }
   }
 
+  if ($form->{"partsgroup_id"}) {
+    $form->{"l_partsgroup"} = '1'; # show the column
+    push @where_tokens, "pg.id = ?";
+    push @bind_vars, $form->{"partsgroup_id"};
+  }
+
   foreach (@like_filters) {
     next unless $form->{$_};
     $form->{"l_$_"} = '1'; # show the column