diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-10-24 10:55:50 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-10-24 10:55:50 -0400 |
commit | ec5b34c097718b91d98d90fece500864e50892b9 (patch) | |
tree | 95f75699c5aa7182bc8fe635d083b5f73ea6c166 /FS/FS/cust_main | |
parent | 25f16a9668fba4e652372228ca55789ce50e2fa8 (diff) |
RT# 76722 - added option to search on tags not selected in advanced customer report
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Search.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index bfaf6217c..3e77704e6 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -1016,8 +1016,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 = '. $_ . ')'; } |