diff options
Diffstat (limited to 'httemplate/misc/print-invoice.cgi')
-rwxr-xr-x | httemplate/misc/print-invoice.cgi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/httemplate/misc/print-invoice.cgi b/httemplate/misc/print-invoice.cgi index a5500bff2..8c1240c05 100755 --- a/httemplate/misc/print-invoice.cgi +++ b/httemplate/misc/print-invoice.cgi @@ -11,7 +11,14 @@ 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 ) + + if ( $conf->exists('invoice_latex') ) { + $cust_bill->print_ps; + #print LPR $cust_bill->print_ps; #( date ) + } else { + print LPR $cust_bill->print_text; #( date ) + } + close LPR or die $! ? "Error closing $lpr: $!" : "Exit status $? from $lpr"; |