X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/2d51ec2e72f4b8cc59be91ee77e6568758f28ee9..711e6c99a7057aa79b306e9cbd789d88d4b022a2:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index d91c4c513..4ce1b1035 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -318,6 +318,49 @@ SQL push(@values, like($form->{phone_notes}), like($form->{phone_notes})); } + $form->{fulltext} = trim($form->{fulltext}); + if ($form->{fulltext}) { + my @fulltext_fields = qw(o.notes + o.intnotes + o.shippingpoint + o.shipvia + o.transaction_description + o.quonumber + o.ordnumber + o.cusordnumber); + $query .= ' AND ('; + $query .= join ' ILIKE ? OR ', @fulltext_fields; + $query .= ' ILIKE ?'; + + $query .= <{fulltext})) for 1 .. (scalar @fulltext_fields) + 5; + } + if ($form->{parts_partnumber}) { $query .= <