invoices look like they belong under customers
[freeside.git] / httemplate / view / cust_main / menu.html
index 5429e8e..c6aa15c 100644 (file)
 
 </style>
 
-<& /elements/one_time_charge_link.html, form_only=>1 &>
-
 <ul id="customer_menu">
 % foreach my $submenu (@processed_menu) {
   <li>
@@ -317,7 +315,7 @@ my @menu = (
       label       => 'Schedule new appointment',
       confexists  => 'ticket_system',
       acl        => 'Make appointment',
-      popup       => "elements/make_appointment.html?custnum=$custnum",
+      popup       => "misc/make_appointment.html?custnum=$custnum",
       actionlabel => 'Schedule appointment',
     },
   ],
@@ -358,12 +356,7 @@ my @menu = (
     {
       # it's just a popup, but there's some freaky CCH tax stuff in it
       label       => 'One-time charge',
-      content     => sub {
-                      include( '/elements/one_time_charge_link.html',
-                        custnum => shift->custnum,
-                        no_form => 1,
-                      );
-                     },
+      url         => "edit/quick-charge.html?custnum=$custnum",
       acl         => 'One-time charge',
     },
     {
@@ -398,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
     },
   ],
   [
@@ -418,7 +421,6 @@ my @menu = (
           width       => 763,
           height      => 392,
           acl         => [ 'Post payment', 'Post check payment' ],
-          condition   => sub { $payby{BILL} },
         },
         {
           label       => 'Enter cash payment',
@@ -427,35 +429,34 @@ my @menu = (
           width       => 763,
           height      => 392,
           acl         => [ 'Post payment', 'Post cash payment' ],
-          condition   => sub { $payby{CASH} },
-        },
-        {
-          label       => 'Enter Western Union payment',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
-          actionlabel => 'Enter Western Union payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{WEST} },
-        },
-        {
-          label       => 'Record manual (offline/POS) credit card payment',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
-          actionlabel => 'Enter credit card payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{MCRD} },
-        },
-        {
-          label       => 'Record manual (offline/POS) electronic check',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
-          actionlabel => 'Enter credit card payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{MCHK} },
         },
+        #{
+        #  label       => 'Enter Western Union payment',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
+        #  actionlabel => 'Enter Western Union payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{WEST} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) credit card payment',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
+        #  actionlabel => 'Enter credit card payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{MCRD} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) electronic check',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
+        #  actionlabel => 'Enter credit card payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{MCHK} },
+        #},
       ],
     },
 
@@ -513,7 +514,6 @@ my @menu = (
           actionlabel => 'Enter check refund',
           width       => 440,
           acl         => ['Post refund', 'Post check refund'],
-          condition   => sub { $payby{BILL} },
         },
         {
           label       => 'Enter cash refund',
@@ -521,24 +521,23 @@ my @menu = (
           actionlabel => 'Enter cash refund',
           width       => 392,
           acl         => ['Post refund', 'Post cash refund'],
-          condition   => sub { $payby{CASH} },
-        },
-        {
-          label       => 'Record manual (offline/POS) credit card refund',
-          popup       => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
-          actionlabel => 'Enter credit card refund',
-          width       => 440,
-          acl         => ['Post refund' ],
-          condition   => sub { $payby{MCRD} },
-        },
-        {
-          label       => 'Record manual (offline/POS) electronic check refund',
-          popup       => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
-          actionlabel => 'Enter electronic check refund',
-          width       => 440,
-          acl         => ['Post refund' ],
-          condition   => sub { $payby{MCHK} },
         },
+        #{
+        #  label       => 'Record manual (offline/POS) credit card refund',
+        #  popup       => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
+        #  actionlabel => 'Enter credit card refund',
+        #  width       => 440,
+        #  acl         => ['Post refund' ],
+        ##  condition   => sub { $payby{MCRD} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) electronic check refund',
+        #  popup       => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
+        #  actionlabel => 'Enter electronic check refund',
+        #  width       => 440,
+        #  acl         => ['Post refund' ],
+        ##  condition   => sub { $payby{MCHK} },
+        #},
 
       ],
 
@@ -689,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"];