X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmenu.html;h=ff001bb67e818c16535ecf2fff9762535708c872;hb=0ed195595b5c7ea404c8848d9d1881ada4214489;hp=e85cc2529a512221e32d597b87d8500ac12926d8;hpb=caaacb0401180bfbef36274a3d2be1e1a729860f;p=freeside.git diff --git a/httemplate/view/cust_main/menu.html b/httemplate/view/cust_main/menu.html index e85cc2529..ff001bb67 100644 --- a/httemplate/view/cust_main/menu.html +++ b/httemplate/view/cust_main/menu.html @@ -112,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 = ( [ @@ -194,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', }, ], [ @@ -447,9 +452,9 @@ my @menu = ( }, # separator, definitely { - label => 'Download statement', + label => 'Download PDF statement', url => "view/cust_main_statement-pdf.cgi?$custnum", - acl => 'List invoices', + acl => 'View legacy typeset statements', condition => sub { FS::cust_bill->count('custnum = ?', shift->custnum) > 0 }, @@ -478,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 => 'Resend invoices', + }, ], [ { @@ -540,6 +557,7 @@ foreach my $submenu (@menu) { } $a .= qq[>$label ]; + $cgi->param('show', $opt{show}); } elsif ( $entry->{popup} ) {