improve RADIUS data usage report: multiple export selection, optionally group by...
[freeside.git] / httemplate / view / cust_main / packages.html
index 228b04e..c191961 100755 (executable)
@@ -96,7 +96,7 @@ if ( el ) el.scrollIntoView(true);
 %        && $conf->config('payby-default') ne 'HIDE'
 %      ) {
   <% $s++ ? ' | ' : '' %>
-  <& one_time_charge_link.html, $cust_main &>
+  <& /elements/one_time_charge_link.html, 'custnum'=>$cust_main->custnum &>
 % } 
 
 % if ( $curuser->access_right('Bulk move customer services') ) { 
@@ -167,6 +167,18 @@ if ( el ) el.scrollIntoView(true);
         <A HREF="<%$p%>search/report_svc_acct.html?custnum=<% $cust_main->custnum %>"><% mt('accounts') |h %></A><BR>
       <% mt('Usage reports:') |h %> 
         <A HREF="<%$p%>search/report_cdr.html?custnum=<% $cust_main->custnum %>"><% mt('CDRs') |h %></A>
+%      if ( $curuser->access_right('Usage: RADIUS sessions')
+%           and $cust_main->num_usage_pkgs > 0 ) {
+       |
+     <& /elements/popup_link-cust_main.html,
+                 'label'       => emt('Data usage'),
+                 'action'      => "${p}search/report_sqlradius_usage-custnum.html",
+                 'cust_main'   => $cust_main,
+                 'actionlabel' => emt('Data usage report'),
+                 'width'       => 480,
+                 'height'      => 345,
+     &>
+%      }
     </TD>
 
 %   } # unless $opt{no_links}