fix import of 0 custom price, RT#76992
[freeside.git] / httemplate / misc / fax-invoice.cgi
1 <% $cgi->redirect("${p}view/cust_main.cgi?$custnum") %>
2 <%init>
3
4 die "access denied"
5   unless $FS::CurrentUser::CurrentUser->access_right('Resend invoices');
6
7 #untaint invnum
8 my($query) = $cgi->keywords;
9 $query =~ /^((.+)-)?(\d+)$/;
10 my $template = $2;
11 my $invnum = $3;
12 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
13 die "Can't find invoice!\n" unless $cust_bill;
14
15 $cust_bill->fax_invoice({ 'template' => $template });
16
17 my $custnum = $cust_bill->getfield('custnum');
18
19 </%init>