summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-03-29 17:27:18 +0000
committerivan <ivan>2002-03-29 17:27:18 +0000
commit12fca9ac80c2b0444a7916506f6e2a8fa98bc24d (patch)
treeaecbada128f643b9c13345e90098075ce0166b53
parent7eeed574765f53a3f279d1f5ba518f8c4cfaf386 (diff)
fix unlinked svc browse!
-rw-r--r--htetc/global.asa2
-rw-r--r--htetc/handler.pl2
-rwxr-xr-xhttemplate/search/svc_acct.cgi7
3 files changed, 6 insertions, 5 deletions
diff --git a/htetc/global.asa b/htetc/global.asa
index 94d6b7e3e..48d0d6fcd 100644
--- a/htetc/global.asa
+++ b/htetc/global.asa
@@ -10,7 +10,7 @@ use IO::Handle;
use IO::File;
use String::Approx qw(amatch);
use HTML::Widgets::SelectLayers;
-use FS::UID qw(cgisuidsetup dbh getotaker datasrc);
+use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name);
use FS::Record qw(qsearch qsearchs fields dbdef);
use FS::Conf;
use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot
diff --git a/htetc/handler.pl b/htetc/handler.pl
index 8e097c656..1a746a552 100644
--- a/htetc/handler.pl
+++ b/htetc/handler.pl
@@ -67,7 +67,7 @@ sub handler
use IO::File;
use String::Approx qw(amatch);
use HTML::Widgets::SelectLayers;
- use FS::UID qw(cgisuidsetup dbh getotaker datasrc);
+ use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name);
use FS::Record qw(qsearch qsearchs fields dbdef);
use FS::Conf;
use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot
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);