blob: a5500bff2146b91805b4c6320c30317bc2111a2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<%
my $conf = new FS::Conf;
my $lpr = $conf->config('lpr');
#untaint invnum
my($query) = $cgi->keywords;
$query =~ /^(\d*)$/;
my $invnum = $1;
my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
die "Can't find invoice!\n" unless $cust_bill;
open(LPR,"|$lpr") or die "Can't open $lpr: $!";
print LPR $cust_bill->print_text; #( date )
close LPR
or die $! ? "Error closing $lpr: $!"
: "Exit status $? from $lpr";
my $custnum = $cust_bill->getfield('custnum');
print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history");
%>
|