quick list of area codes and a kludge to print DA numbers for all of them
[freeside.git] / httemplate / view / svc_broadband.cgi
index a76e5a3..145d341 100644 (file)
@@ -1,11 +1,10 @@
 <%include("/elements/header.html",'Broadband Service View', menubar(
   ( ( $custnum )
-    ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+    ? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
       )                                                                       
     : ( "Cancel this (unaudited) website" =>
           "${p}misc/cancel-unaudited.cgi?$svcnum" )
-  ),
-  "Main menu" => $p,
+  )
 ))
 %>
 
@@ -144,8 +143,7 @@ Add router named
 <%init>
 
 die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('View customer services')
-      || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me
+  unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
 
 my($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
@@ -163,10 +161,11 @@ my $svc_broadband = qsearchs({
 #false laziness w/all svc_*.cgi
 my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
 my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
+my($cust_pkg, $custnum, $display_custnum);
 if ($pkgnum) {
   $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
   $custnum = $cust_pkg->custnum;
+  $display_custnum = $cust_pkg->cust_main->display_custnum;
 } else {
   $cust_pkg = '';
   $custnum = '';