X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=7e2c8fb558d3c3d8404cdab8a88a866fa3c8bad6;hb=04c0875f27d36309b6d8da8063a9254fef3a7398;hp=a6b4e1e5ea7627ed0dffdbcfd5c499fb3f7b71a2;hpb=03cf0e09e1dfa75fd320ddcbad958301a6546675;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index a6b4e1e5e..7e2c8fb55 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -339,7 +339,7 @@ sub send { 'subject' => 'Invoice', 'body' => \@print_text, ); - return "can't send invoice: $error" if $error; + die "can't email invoice: $error\n" if $error; } @@ -350,11 +350,11 @@ sub send { if ( grep { $_ eq 'POST' } @invoicing_list ) { #postal my $lpr = $conf->config('lpr'); open(LPR, "|$lpr") - or return "Can't open pipe to $lpr: $!"; + or die "Can't open pipe to $lpr: $!\n"; print LPR @print_text; close LPR - or return $! ? "Error closing $lpr: $!" - : "Exit status $? from $lpr"; + or die $! ? "Error closing $lpr: $!\n" + : "Exit status $? from $lpr\n"; } ''; @@ -1153,7 +1153,7 @@ sub print_pdf { open(PDF, "<$file.pdf") or die "can't open $file.pdf (probably error in LaTeX tempalte: $!\n"; -# unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex"); + unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex"); my $pdf = ''; while () {