Revision 9cd3d899
Von Werner Hahn vor 9 Monaten hinzugefügt
SL/Controller/TopQuickSearch/GLTransaction.pm | ||
---|---|---|
30 | 30 |
my $apinvnumberquery = { ilike => like($term) }; |
31 | 31 |
my $namequery = { ilike => like($term) }; |
32 | 32 |
my $arinvnumberquery = { ilike => '%' . SL::Util::trim($term) }; |
33 |
my $arinvnumber_right_query = { ilike => SL::Util::trim($term) . '%' }; |
|
33 | 34 |
# ar match is more restrictive. Left fuzzy beginning so it also matches "Storno zu $INVNUMBER" |
34 |
# and numbers like 000123 if you only enter 123. |
|
35 |
# When used in quicksearch short numbers like 1 or 11 won't match because of the |
|
36 |
# ajax autocomplete minlimit of 3 characters |
|
35 |
# and numbers like 000123 if you only enter 123. Right beginning searches from the begin. |
|
37 | 36 |
|
38 | 37 |
my (@glfilter, @arfilter, @apfilter); |
39 | 38 |
|
40 | 39 |
push( @glfilter, (or => [ description => $descriptionquery, reference => $referencequery ] ) ); |
41 |
push( @arfilter, (or => [ invnumber => $arinvnumberquery, name => $namequery ] ) ); |
|
40 |
push( @arfilter, (or => [ invnumber => $arinvnumberquery, invnumber => $arinvnumber_right_query, name => $namequery ] ) );
|
|
42 | 41 |
push( @apfilter, (or => [ invnumber => $apinvnumberquery, name => $namequery ] ) ); |
43 | 42 |
|
44 | 43 |
my $gls = SL::DB::Manager::GLTransaction->get_all( query => [ @glfilter ], limit => $limit, sort_by => 'transdate DESC'); |
Auch abrufbar als: Unified diff
TopQuickSearch: GL Suche Verkaufrechnungen auch vom Anfang suchen
behebt #657