X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d232a24687ea63a0f57723b7730d82f12241cec9..5074cc502811728e2bbaf42cfd5ea39974ba6e2a:/SL/IC.pm diff --git a/SL/IC.pm b/SL/IC.pm index c07227f54..e3b33d7c7 100644 --- 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 {