projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
896617d
)
as an invoice event, emailing/printing problems should be fatal and trigger retry
author
ivan
<ivan>
Wed, 21 Apr 2004 20:52:32 +0000
(20:52 +0000)
committer
ivan
<ivan>
Wed, 21 Apr 2004 20:52:32 +0000
(20:52 +0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
a3e7662
..
7e2c8fb
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-339,7
+339,7
@@
sub send {
'subject' => 'Invoice',
'body' => \@print_text,
);
'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")
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
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
";
}
'';
}
'';