invoices look like they belong under customers
[freeside.git] / httemplate / view / cust_main / menu.html
index 9e194f4..c6aa15c 100644 (file)
@@ -391,8 +391,18 @@ my @menu = (
       url   => "search/report_svc_acct.html?custnum=$custnum",
     },
     {
+      label => 'View data usage',
+      popup => "search/report_sqlradius_usage-custnum.html?$custnum",
+      acl   => 'Usage: RADIUS sessions',
+      actionlabel => 'Data usage report',
+      width   => 480,
+      height  => 345,
+      condition => sub { shift->num_usage_pkgs > 0 },
+    },
+    {
       label => 'View CDRs',
       url   => "search/report_cdr.html?custnum=$custnum",
+      # XXX should have a condition that the customer has any CDR packages
     },
   ],
   [
@@ -678,7 +688,13 @@ sub entry2link {
 
       # the menu head: always a link back to this page
       $cgi->param('show', $entry->{show});
-      $target = $cgi->self_url;
+
+      #$target = $cgi->self_url;
+      #XXX support installs outside /freeside in 4.x
+      $target = '/freeside/view/cust_main.cgi?'.
+                  'show='. $entry->{show}.
+                  ';custnum='. $cust_main->custnum;
+
       $cgi->param('show', $show);
 
       my $a = qq[ <A HREF="$target"];