summaryrefslogtreecommitdiff
path: root/httemplate/misc/print-invoice.cgi
blob: 6a4c2d7f14d2cb832df3c9178406f27f0e40c19f (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->print($template);

my $custnum = $cust_bill->getfield('custnum');

print $cgi->redirect("${p}view/cust_main.cgi?$custnum");

%>