diff options
Diffstat (limited to 'httemplate/misc/fax-invoice.cgi')
-rwxr-xr-x | httemplate/misc/fax-invoice.cgi | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/httemplate/misc/fax-invoice.cgi b/httemplate/misc/fax-invoice.cgi index 94fee2cf2..1ddc23ece 100755 --- a/httemplate/misc/fax-invoice.cgi +++ b/httemplate/misc/fax-invoice.cgi @@ -1,17 +1,18 @@ -<% +% +% +%#untaint invnum +%my($query) = $cgi->keywords; +%$query =~ /^((.+)-)?(\d+)$/; +%my $template = $2; +%my $invnum = $3; +%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); +%die "Can't find invoice!\n" unless $cust_bill; +% +%$cust_bill->fax($template); +% +%my $custnum = $cust_bill->getfield('custnum'); +% +%print $cgi->redirect("${p}view/cust_main.cgi?$custnum"); +% +% -#untaint invnum -my($query) = $cgi->keywords; -$query =~ /^((.+)-)?(\d+)$/; -my $template = $2; -my $invnum = $3; -my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -die "Can't find invoice!\n" unless $cust_bill; - -$cust_bill->fax($template); - -my $custnum = $cust_bill->getfield('custnum'); - -print $cgi->redirect("${p}view/cust_main.cgi?$custnum"); - -%> |