projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 76722 - added option to search on tags not selected in advanced customer report
[freeside.git]
/
FS
/
FS
/
cust_main
/
Search.pm
diff --git
a/FS/FS/cust_main/Search.pm
b/FS/FS/cust_main/Search.pm
index
1a19ea3
..
58bdd88
100644
(file)
--- a/
FS/FS/cust_main/Search.pm
+++ b/
FS/FS/cust_main/Search.pm
@@
-1049,8
+1049,9
@@
sub search {
if ( @tagnums ) {
if ( $params->{'all_tags'} ) {
if ( @tagnums ) {
if ( $params->{'all_tags'} ) {
+ my $exists = $params->{'all_tags'} eq 'all' ? 'exists' : 'not exists';
foreach ( @tagnums ) {
foreach ( @tagnums ) {
- push @where,
'exists
(select 1 from cust_tag where '.
+ push @where,
$exists.'
(select 1 from cust_tag where '.
'cust_tag.custnum = cust_main.custnum and tagnum = '.
$_ . ')';
}
'cust_tag.custnum = cust_main.custnum and tagnum = '.
$_ . ')';
}