From a47374ae5aba9530e999f630ca5a21eb758cc0b5 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 4 Oct 2002 12:09:21 +0000 Subject: [PATCH] default for customers with no invoices was: print is now: send email to invoice from address --- FS/FS/cust_bill.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index f0667258c..296c8b6a6 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -352,7 +352,11 @@ sub send { my @print_text = $self->print_text('', $template); my @invoicing_list = $self->cust_main->invoicing_list; - if ( grep { $_ ne 'POST' } @invoicing_list ) { #email invoice + if ( grep { $_ ne 'POST' } @invoicing_list or !@invoicing_list ) { #email + + #better to notify this person than silence + @invoicing_list = ($invoice_from) unless @invoicing_list; + #false laziness w/FS::cust_pay::delete & fs_signup_server && ::realtime_card #$ENV{SMTPHOSTS} = $smtpmachine; $ENV{MAILADDRESS} = $invoice_from; @@ -377,7 +381,7 @@ sub send { } - if ( ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list ) { #postal + if ( grep { $_ eq 'POST' } @invoicing_list ) { #postal open(LPR, "|$lpr") or return "Can't open pipe to $lpr: $!"; print LPR @print_text; @@ -1039,7 +1043,7 @@ sub print_text { =head1 VERSION -$Id: cust_bill.pm,v 1.46 2002-09-21 11:17:39 ivan Exp $ +$Id: cust_bill.pm,v 1.47 2002-10-04 12:09:21 ivan Exp $ =head1 BUGS -- 2.11.0