summaryrefslogtreecommitdiff
path: root/httemplate/misc/fax-invoice.cgi
blob: 94fee2cf2503f3cb87537d9cfd011adac08c54ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%

#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");

%>