add per-customer "Invoice reports" link, RT#13802
[freeside.git] / httemplate / view / svc_broadband.cgi
index 0e9656b..dead70b 100644 (file)
@@ -8,7 +8,9 @@
 ))
 %>
 
-<A HREF="<%${p}%>edit/svc_broadband.cgi?<%$svcnum%>">Edit this information</A>
+<% include('/elements/init_overlib.html') %>
+
+<% include('/view/elements/svc_edit_link.html', 'svc'=>$svc_broadband) %>
 <BR>
 <%ntable("#cccccc")%>
   <TR>
 %       if ( $ip_addr ) { 
           <TR>
             <TD ALIGN="right">IP Address</TD>
-            <TD BGCOLOR="#ffffff"><%$ip_addr%></TD>
+            <TD BGCOLOR="#ffffff">
+              <%$ip_addr%>
+              (<% include('/elements/popup_link-ping.html', 'ip'=>$ip_addr ) %>)
+            </TD>
           </TR>
           <TR>
             <TD ALIGN="right">IP Netmask</TD>
           <TD ALIGN="right">Authentication Key</TD>
           <TD BGCOLOR="#ffffff"><%$auth_key%></TD>
         </TR>
+       <TR>
+          <TD ALIGN="right">Service Plan Id</TD>
+          <TD BGCOLOR="#ffffff"><%$plan_id%></TD>
+        </TR>
         <TR COLSPAN="2"><TD></TD></TR>
 %
 %foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
@@ -163,7 +172,9 @@ my $svc_broadband = qsearchs({
                  ' LEFT JOIN cust_pkg  USING ( pkgnum  ) '.
                  ' LEFT JOIN cust_main USING ( custnum ) ',
   'hashref'   => { 'svcnum' => $svcnum },
-  'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+  'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
+                            'null_right' => 'View/link unlinked services'
+                          ),
 }) or die "svc_broadband: Unknown svcnum $svcnum";
 
 #false laziness w/all svc_*.cgi
@@ -196,6 +207,7 @@ my (
      $vlan_profile,
      $auth_key,
      $description,
+     $plan_id,
    ) = (
      $svc_broadband->getfield('speed_down'),
      $svc_broadband->getfield('speed_up'),
@@ -207,6 +219,7 @@ my (
      $svc_broadband->vlan_profile,
      $svc_broadband->auth_key,
      $svc_broadband->description,
+     $svc_broadband->plan_id,
    );
 
 </%init>