RT#34078: Payment History Report / Statement [various fixes, integrated with selfservice]
[freeside.git] / httemplate / view / cust_main / menu.html
index 01a5a65..90a20ed 100644 (file)
 
 #menu_ul a {
   display: block;
-  margin: 0;
+  margin-left: 0;
+  margin-right: 1em;
+  margin-bottom: -1px;
+  margin-top: 0;
   padding: .5em .75em;
-  background: #ffffff;
+  background: #e0e0e0;
   color: #525151;
   white-space: nowrap;
   text-decoration: none;
-  border-top: thin solid #CFDEFF;
+  border-top-left-radius: .5em;
+  border-top-right-radius: .5em;
 }
 
 #menu_ul a.current_show {
   font-weight: bold;
-  background: #cfdeff;
+  background: #FFFFFF;
+  border-top: thin solid #7e0079;
+  border-left: thin solid #7e0079;
+  border-right: thin solid #7e0079;
+  border-bottom: thin solid #ffffff;
 }
 
 #menu_ul ul {
   top: 100%;
   left: 0;
   background: #ffffff;
-  border-bottom: thin solid #CFDEFF;
+  border: thin solid #7e0079;
+  z-index:8888;
+  border-radius: 2px;
+  box-shadow: #333333 1px 1px 2px;
 }
 
 #menu_ul ul li {
 }
 
 #menu_ul ul a {
-  border-top: thin solid #CFDEFF;
   color: #333333;
   background: transparent;
+  border-bottom: none;
+  border-radius: 0;
 }
 
 #menu_ul a:hover {
-  background: #cfdeff;
   text-decoration: underline;
   color: #7e0079;
 }
@@ -101,6 +112,9 @@ my $conf = FS::Conf->new;
 
 my %payby = map { $_ => 1 } $conf->config('payby');
 
+# cached for conditions, to avoid looking it up twice
+my $invoicing_list_emailonly = $cust_main->invoicing_list_emailonly;
+
 # nice declarative menu; should be a parameter to some kind of menu generator
 my @menu = ( 
   [
@@ -183,10 +197,12 @@ my @menu = (
       url         => sub {
                       my $cust_main = shift;
                       my $agentnum = $cust_main->agentnum;
-                      'misc/email-customers.html?table=cust_main;search_hash='.
-                      'agent_virt_agentnum='.$agentnum.";custnum=$custnum";
+                      'misc/email-customers.html?table=cust_main;'.
+                      'agent_virt_agentnum='.$agentnum.";custnum=$custnum;url=".
+                      uri_escape($cgi->self_url);
                      },
-      condition   => sub { shift->invoicing_list_emailonly },
+      condition   => sub { $invoicing_list_emailonly },
+      acl         => 'Bulk send customer notices',
     },
   ],
   [
@@ -241,7 +257,7 @@ my @menu = (
       show  => 'quotations',
     },
     {
-      label => 'Add quotation',
+      label => 'Create new quotation',
       url   => "edit/quotation.html?custnum=$custnum",
       acl   => 'Generate quotation',
     },
@@ -467,6 +483,18 @@ my @menu = (
         FS::cust_pay_pending->count('custnum = ?', shift->custnum) > 0
       },
     },
+    {
+      label       => 'Email statement to this customer',
+      url         => sub {
+                      my $cust_main = shift;
+                      my $agentnum = $cust_main->agentnum;
+                      'misc/email-customer-statement.html?table=cust_main;'.
+                      'agent_virt_agentnum='.$agentnum.";custnum=$custnum;url=".
+                      uri_escape($cgi->self_url);
+                     },
+      condition   => sub { $invoicing_list_emailonly },
+      acl         => [ 'View invoices', 'Bulk send customer notices' ],
+    },
   ],
   [
     {