X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fprint-invoice.cgi;h=0dda68a4eabd919a2a4f04f176cdb712398aa70a;hp=aec7cb39c75c1d5b10637d38e93144a86f84d154;hb=b3808f960c0351710f7005e7a2729925f57c7f4a;hpb=1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 diff --git a/httemplate/misc/print-invoice.cgi b/httemplate/misc/print-invoice.cgi index aec7cb39c..0dda68a4e 100755 --- a/httemplate/misc/print-invoice.cgi +++ b/httemplate/misc/print-invoice.cgi @@ -1,4 +1,3 @@ - <% my $conf = new FS::Conf; @@ -12,7 +11,13 @@ 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') ) { + 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";