X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4b47dbd9756ab4d8df2ee508fb3179c77372629a..157de633439c883a1f8ee0d2a36bb7757fb2b662:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index 043e84620..5b0934221 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -970,7 +970,12 @@ sub retrieve_item { $where .= " AND lower(${table_column}) LIKE lower(?)"; push @values, '%' . $form->{"${field}_${i}"} . '%'; } - + #Es soll auch nach EAN gesucht werden, ohne Einschränkung durch Beschreibung + if ($form->{"partnumber_$i"} && !$form->{"description_$i"}) { + $where .= qq| OR (NOT p.obsolete = '1' AND p.ean = ? )|; + push @values, $form->{"partnumber_$i"}; + } + if ($form->{"description_$i"}) { $where .= " ORDER BY p.description"; } else {