From ec5b34c097718b91d98d90fece500864e50892b9 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 24 Oct 2018 10:55:50 -0400 Subject: RT# 76722 - added option to search on tags not selected in advanced customer report --- FS/FS/cust_main/Search.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FS/FS/cust_main/Search.pm') diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index bfaf621..3e77704 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 = '. $_ . ')'; } -- cgit v1.1