add per-customer "Invoice reports" link, RT#13802
[freeside.git] / httemplate / view / svc_broadband.cgi
index 1463925..dead70b 100644 (file)
@@ -10,7 +10,7 @@
 
 <% include('/elements/init_overlib.html') %>
 
-<A HREF="<%$p%>edit/svc_broadband.cgi?<%$svcnum%>">Edit this information</A>
+<% include('/view/elements/svc_edit_link.html', 'svc'=>$svc_broadband) %>
 <BR>
 <%ntable("#cccccc")%>
   <TR>
           <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) {
@@ -168,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
@@ -201,6 +207,7 @@ my (
      $vlan_profile,
      $auth_key,
      $description,
+     $plan_id,
    ) = (
      $svc_broadband->getfield('speed_down'),
      $svc_broadband->getfield('speed_up'),
@@ -212,6 +219,7 @@ my (
      $svc_broadband->vlan_profile,
      $svc_broadband->auth_key,
      $svc_broadband->description,
+     $svc_broadband->plan_id,
    );
 
 </%init>