From: Sven Schöling Date: Thu, 24 Mar 2016 13:14:22 +0000 (+0100) Subject: oe.pl: Schnellsuche analog zu all:substr:multi::ilike X-Git-Tag: release-3.4.1~282 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aa4fda0ec21c0715f1d8af27efdd900af3dd4915;p=kivitendo-erp.git oe.pl: Schnellsuche analog zu all:substr:multi::ilike --- diff --git a/SL/OE.pm b/SL/OE.pm index 459944318..1c812e24f 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -50,6 +50,7 @@ use SL::DBUtils; use SL::HTML::Restrict; use SL::IC; use SL::TransNumber; +use Text::ParseWords; use strict; @@ -285,6 +286,18 @@ SQL push @values, conv_date($form->{expected_billing_date_to}); } + if ($form->{all}) { + my @tokens = parse_line('\s+', 0, $form->{all}); + # ordnumber quonumber customer.name vendor.name transaction_description + $query .= qq| AND ( + o.ordnumber ILIKE ? OR + o.quonumber ILIKE ? OR + ct.name ILIKE ? OR + o.transaction_description ILIKE ? + )| for @tokens; + push @values, ("%$_%")x4 for @tokens; + } + my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', 'trans_id_field' => 'ct.id', 'filter' => $form, diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 4c29292aa..ed13848c2 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -984,6 +984,7 @@ sub orders { push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}" if $form->{cusordnumber}; push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes}; push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; + push @options, $locale->text('Quick Search') . " : $form->{all}" if $form->{all}; push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}" if $form->{shippingpoint}; if ( $form->{transdatefrom} or $form->{transdateto} ) { push @options, $locale->text('Order Date'); diff --git a/locale/de/all b/locale/de/all index de2c7f2e3..93374b3a9 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2187,6 +2187,7 @@ $self->{texts} = { 'Quarterly' => 'quartalsweise', 'Query Type' => 'Art der Abfrage', 'Queue' => 'Warteschlange', + 'Quick Search' => 'Schnellsuche', 'Quick Searches that will be shown in the header in this client' => 'Schnellsuchen, die in der Kopfzeile in diesem Mandanten gezeigt werden sollen', 'Quotation' => 'Angebot', 'Quotation Date' => 'Angebotsdatum',