summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-10-24 10:55:50 -0400
committerChristopher Burger <burgerc@freeside.biz>2018-10-24 11:45:01 -0400
commit8120b9af43dac87f1a41ac3c8434465517235a25 (patch)
tree1b2bc5b11964f8d2d601b476c4368ab8446c9a9e /FS
parent917d2f19d6c4403e685810cc5354640c561aa0b7 (diff)
RT# 76722 - added option to search on tags not selected in advanced customer report
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main/Search.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index 1a19ea343..58bdd8835 100644
--- 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'} ) {
+ my $exists = $params->{'all_tags'} eq 'all' ? 'exists' : 'not exists';
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 = '.
$_ . ')';
}