3 my $conf = new FS::Conf;
4 my $lpr = $conf->config('lpr');
7 my($query) = $cgi->keywords;
10 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
11 die "Can't find invoice!\n" unless $cust_bill;
13 open(LPR,"|$lpr") or die "Can't open $lpr: $!";
15 if ( $conf->exists('invoice_latex') ) {
16 print LPR $cust_bill->print_ps; #( date )
18 print LPR $cust_bill->print_text; #( date )
22 or die $! ? "Error closing $lpr: $!"
23 : "Exit status $? from $lpr";
25 my $custnum = $cust_bill->getfield('custnum');
27 print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history");