From 157de633439c883a1f8ee0d2a36bb7757fb2b662 Mon Sep 17 00:00:00 2001 From: Holger Lindemann Date: Fri, 24 Apr 2009 12:59:07 +0000 Subject: [PATCH] =?utf8?q?Suche=20auch=20nach=20EAN=20auf=20Gleichheit,=20?= =?utf8?q?wenn=20nur=20partnumber=20gef=C3=BCllt=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IR.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { -- 2.20.1