summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_main.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/cust_main.cgi')
-rwxr-xr-xhttemplate/search/cust_main.cgi14
1 files changed, 2 insertions, 12 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 665f5637d..36ad39da8 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -102,18 +102,8 @@ if ( $cgi->param('browse')
&& ! $cgi->param('showcancelledcustomers') )
) {
#grep { $_->ncancelled_pkgs || ! $_->all_pkgs }
- push @qual, "
- ( 0 < ( SELECT COUNT(*) FROM cust_pkg
- WHERE cust_pkg.custnum = cust_main.custnum
- AND ( cust_pkg.cancel IS NULL
- OR cust_pkg.cancel = 0
- )
- )
- OR 0 = ( SELECT COUNT(*) FROM cust_pkg
- WHERE cust_pkg.custnum = cust_main.custnum
- )
- )
- ";
+ push @qual, FS::cust_main->uncancel_sql;
+
}
push @qual, FS::cust_main->cancel_sql if $cgi->param('cancelled');