1 <% $cgi->redirect("${p}view/cust_main.cgi?$custnum") %>
4 my %method = map { $_=>1 } qw( email print fax_invoice );
10 unless $FS::CurrentUser::CurrentUser->access_right('Resend invoices');
12 my $statementnum = $cgi->param('statementnum');
13 my $template = $cgi->param('template') || 'statement'; #XXX configure... via event?? eh..
14 my $notice_name = $cgi->param('notice_name') if $cgi->param('notice_name');
15 my $method = $cgi->param('method');
17 $method .= '_invoice' if $method eq 'fax'; #!
19 die "unknown method $method" unless $method{$method};
21 my $cust_statement = qsearchs('cust_statement',{'statementnum'=>$statementnum});
22 die "Can't find statement!\n" unless $cust_statement;
24 $cust_statement->$method({ 'template' => $template });
26 my $custnum = $cust_statement->getfield('custnum');