diff options
| -rw-r--r-- | FS/FS/cust_main/Search.pm | 3 | ||||
| -rwxr-xr-x | httemplate/search/report_cust_main.html | 4 |
2 files changed, 5 insertions, 2 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 = '. $_ . ')'; } diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index e1ce26dcb..9edd3ee5c 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -104,7 +104,9 @@ <DIV STYLE="display:inline-block; vertical-align:baseline"> <INPUT TYPE="radio" NAME="all_tags" VALUE="0" CHECKED> Any of these <BR> - <INPUT TYPE="radio" NAME="all_tags" VALUE="1"> All of these + <INPUT TYPE="radio" NAME="all_tags" VALUE="all"> All of these + <BR> + <INPUT TYPE="radio" NAME="all_tags" VALUE="none"> None of these </DIV> </TD> </TR> |
