Revision 4cdfbd75
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
SL/Controller/TopQuickSearch/Article.pm | ||
---|---|---|
83 | 83 |
source => { |
84 | 84 |
filter => { |
85 | 85 |
(part_type => $self->part_type) x!!$self->part_type, |
86 |
or => [ obsolete => undef, obsolete => 0 ], |
|
86 | 87 |
'all:substr:multi::ilike' => $::form->{term}, |
87 | 88 |
}, |
88 | 89 |
}, |
SL/Controller/TopQuickSearch/Contact.pm | ||
---|---|---|
19 | 19 |
sub query_autocomplete { |
20 | 20 |
my ($self) = @_; |
21 | 21 |
|
22 |
my $cv_query = <<SQL; |
|
23 |
SELECT id FROM customer |
|
24 |
WHERE (obsolete IS NULL) |
|
25 |
OR (obsolete = FALSE) |
|
26 |
|
|
27 |
UNION |
|
28 |
|
|
29 |
SELECT id FROM vendor |
|
30 |
WHERE (obsolete IS NULL) |
|
31 |
OR (obsolete = FALSE) |
|
32 |
SQL |
|
33 |
|
|
22 | 34 |
my $result = SL::DB::Manager::Contact->get_all( |
23 | 35 |
query => [ |
24 | 36 |
or => [ |
... | ... | |
26 | 38 |
cp_givenname => { ilike => like($::form->{term}) }, |
27 | 39 |
cp_email => { ilike => like($::form->{term}) }, |
28 | 40 |
], |
29 |
cp_cv_id => [ \'SELECT id FROM customer UNION SELECT id FROM vendor' ],
|
|
41 |
cp_cv_id => [ \$cv_query ],
|
|
30 | 42 |
], |
31 | 43 |
limit => 10, |
32 | 44 |
sort_by => 'cp_name', |
SL/Controller/TopQuickSearch/CustomerVendor.pm | ||
---|---|---|
82 | 82 |
source => { |
83 | 83 |
filter => { |
84 | 84 |
'all:substr:multi::ilike' => $::form->{term}, # all filter spec is set in SL::DB::Manager::Customer |
85 |
or => [ obsolete => undef, obsolete => 0 ], |
|
85 | 86 |
}, |
86 | 87 |
}, |
87 | 88 |
sorted => { |
Auch abrufbar als: Unified diff
Quicksuche: bei Stammdatensuche keine ungültigen anbieten
Betrifft:
• Artikelstammdaten in allen Varianten (Waren, Dienstleistungen,
Erzeugnisse, Sortimente)
• Kunden & Lieferanten
• Ansprechpersonen (hier werden nur diejenigen angeboten, die zu
gültigen Kunden/Lieferanten gehören)