X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Ffax-invoice.cgi;h=f72fc7eaf08bb5f0c82de2e067864bb224d0940c;hp=94fee2cf2503f3cb87537d9cfd011adac08c54ae;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=673b9a458d9138523026963df6fa3b4683e09bae diff --git a/httemplate/misc/fax-invoice.cgi b/httemplate/misc/fax-invoice.cgi index 94fee2cf2..f72fc7eaf 100755 --- a/httemplate/misc/fax-invoice.cgi +++ b/httemplate/misc/fax-invoice.cgi @@ -1,4 +1,8 @@ -<% +<% $cgi->redirect("${p}view/cust_main.cgi?$custnum") %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Resend invoices'); #untaint invnum my($query) = $cgi->keywords; @@ -8,10 +12,8 @@ my $invnum = $3; my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Can't find invoice!\n" unless $cust_bill; -$cust_bill->fax($template); +$cust_bill->fax_invoice({ 'template' => $template }); my $custnum = $cust_bill->getfield('custnum'); -print $cgi->redirect("${p}view/cust_main.cgi?$custnum"); - -%> +