X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=36ad39da86e638a9402526675ffd1fc5b989b81b;hp=665f5637dd5a6ca24a9ecf9624ee72d7ca16c857;hb=d453a487d95258e1f11f134fc5864f7e6458a6ef;hpb=7bdf17a005cf4c0fe8b6b6ad1ce97abaa52a4510 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');