Revision bc40bcab
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/TopQuickSearch/GLTransaction.pm | ||
---|---|---|
8 | 8 |
use SL::DB::PurchaseInvoice; |
9 | 9 |
use SL::DB::AccTransaction; |
10 | 10 |
use SL::Locale::String qw(t8); |
11 |
use SL::DBUtils qw(like); |
|
11 | 12 |
use List::Util qw(sum); |
12 | 13 |
|
13 | 14 |
sub auth { 'general_ledger' } |
... | ... | |
24 | 25 |
my $limit = $::form->{limit} || 40; # max number of results per type (AR/AP/GL) |
25 | 26 |
my $term = $::form->{term} || ''; |
26 | 27 |
|
27 |
my $descriptionquery = { ilike => '%' . $term . '%' };
|
|
28 |
my $referencequery = { ilike => '%' . $term . '%' };
|
|
29 |
my $apinvnumberquery = { ilike => '%' . $term . '%' };
|
|
30 |
my $namequery = { ilike => '%' . $term . '%' };
|
|
31 |
my $arinvnumberquery = { ilike => '%' . $term };
|
|
28 |
my $descriptionquery = { ilike => like($term) };
|
|
29 |
my $referencequery = { ilike => like($term) };
|
|
30 |
my $apinvnumberquery = { ilike => like($term) };
|
|
31 |
my $namequery = { ilike => like($term) };
|
|
32 |
my $arinvnumberquery = { ilike => '%' . SL::Util::trim($term) };
|
|
32 | 33 |
# ar match is more restrictive. Left fuzzy beginning so it also matches "Storno zu $INVNUMBER" |
33 | 34 |
# and numbers like 000123 if you only enter 123. |
34 | 35 |
# When used in quicksearch short numbers like 1 or 11 won't match because of the |
Auch abrufbar als: Unified diff
(I)LIKE-Argumente immer mit Funktion SL::DBUtils::like erstellen