X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/af281b3c71e26f85e07e44f5fe1b8b52bceb4b4e..ee23f6e0a13418cf83d8f70063e2a0de5f5ea66b:/SL/IC.pm diff --git a/SL/IC.pm b/SL/IC.pm index ee9227811..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 { @@ -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