summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/svc_acct.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index daf025a38..e28e00e61 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -21,13 +21,14 @@ $query ||= ''; #to avoid use of unitialized value errors
my $unlinked = '';
if ( $query =~ /^UN_(.*)$/ ) {
$query = $1;
- $unlinked = '
+ my $empty = driver_name =~ /^Pg$/i ? qq('') : qq("");
+ $unlinked = "
WHERE 0 <
( SELECT count(*) FROM cust_svc
WHERE cust_svc.svcnum = svc_acct.svcnum
- AND pkgnum IS NULL
+ AND ( pkgnum IS NULL OR pkgnum = 0 OR pkgnum = $empty )
)
- ';
+ ";
}
my(@svc_acct, $sortby);