X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/83560c6383fec7a354753f3187c3677471ba8f06..ee23f6e0a13418cf83d8f70063e2a0de5f5ea66b:/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 {