projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
358f1ed
)
Suche auch nach EAN auf Gleichheit, wenn nur partnumber gefüllt ist
author
Holger Lindemann
<hli@lx-system.de>
Fri, 24 Apr 2009 12:46:37 +0000
(12:46 +0000)
committer
Holger Lindemann
<hli@lx-system.de>
Fri, 24 Apr 2009 12:46:37 +0000
(12:46 +0000)
SL/IS.pm
patch
|
blob
|
history
diff --git
a/SL/IS.pm
b/SL/IS.pm
index
98f2837
..
9a197ab
100644
(file)
--- a/
SL/IS.pm
+++ b/
SL/IS.pm
@@
-1697,13
+1697,19
@@
sub retrieve_item {
my $where = qq|NOT p.obsolete = '1'|;
my @values;
my $where = qq|NOT p.obsolete = '1'|;
my @values;
- foreach my $column (qw(p.partnumber p.description pgpartsgroup)) {
+ foreach my $column (qw(p.partnumber p.description pgpartsgroup
)) {
my ($table, $field) = split m/\./, $column;
next if !$form->{"${field}_${i}"};
$where .= qq| AND lower(${column}) ILIKE ?|;
push @values, '%' . $form->{"${field}_${i}"} . '%';
}
my ($table, $field) = split m/\./, $column;
next if !$form->{"${field}_${i}"};
$where .= qq| AND lower(${column}) ILIKE ?|;
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 .= qq| ORDER BY p.description|;
} else {
if ($form->{"description_$i"}) {
$where .= qq| ORDER BY p.description|;
} else {