X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FOE.pm;h=4ce1b10351b37c485fb0cb83ba7a93095c9d1531;hb=ff159a4d47b9a2d10744dcfc23da2c63605c8a32;hp=d91c4c51343f4743d5335c8a640c69ed361407ec;hpb=2d51ec2e72f4b8cc59be91ee77e6568758f28ee9;p=kivitendo-erp.git 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 .= <