]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Suche auch nach EAN auf Gleichheit, wenn nur partnumber gefüllt ist
authorHolger Lindemann <hli@lx-system.de>
Fri, 24 Apr 2009 12:59:07 +0000 (12:59 +0000)
committerHolger Lindemann <hli@lx-system.de>
Fri, 24 Apr 2009 12:59:07 +0000 (12:59 +0000)
SL/IR.pm

index 043e846201ef3aa4f3fad8aa554dcf8a195b2275..5b093422175de63db6a9ace931e9e16185e2215d 100644 (file)
--- 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 {