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 $invnum = $cgi->param('invnum');
13 my $template = $cgi->param('template');
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_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
22 die "Can't find invoice!\n" unless $cust_bill;
24 $cust_bill->$method({ 'template' => $template,
25 'notice_name' => $notice_name,
28 my $custnum = $cust_bill->getfield('custnum');