diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2018-10-24 10:55:50 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2018-10-24 11:20:38 -0400 |
| commit | d4df360c7618d45cc60647bb31520f757117992f (patch) | |
| tree | bd84d0f8e3502ac929422f57487797b640a0bd9e /FS | |
| parent | 3d7a34ab630e4d7696fe7304a7bf446c1a54ed41 (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.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 269fe3250..353542df0 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -979,8 +979,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 = '. $_ . ')'; } |
