[freeside-commits] freeside/FS/FS cust_bill.pm, 1.299.2.4, 1.299.2.5 Conf.pm, 1.397.2.18, 1.397.2.19
Ivan,,,
ivan at wavetail.420.am
Wed Jan 19 11:12:28 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv25283
Modified Files:
Tag: FREESIDE_2_1_BRANCH
cust_bill.pm Conf.pm
Log Message:
add cust_bill-no_recipients-error config, RT#11276
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.397.2.18
retrieving revision 1.397.2.19
diff -u -w -d -r1.397.2.18 -r1.397.2.19
--- Conf.pm 18 Jan 2011 08:42:23 -0000 1.397.2.18
+++ Conf.pm 19 Jan 2011 19:12:26 -0000 1.397.2.19
@@ -4221,6 +4221,13 @@
'agentonly' => 1,
},
+ {
+ 'key' => 'cust_bill-no_recipients-error',
+ 'section' => 'invoicing',
+ 'description' => 'For customers with no invoice recipients, throw a job queue error rather than the default behavior of emailing the invoice to the invoice_from address.'.
+ 'type' => 'checkbox',
+ },
+
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.299.2.4
retrieving revision 1.299.2.5
diff -u -w -d -r1.299.2.4 -r1.299.2.5
--- cust_bill.pm 18 Jan 2011 08:42:24 -0000 1.299.2.4
+++ cust_bill.pm 19 Jan 2011 19:12:26 -0000 1.299.2.5
@@ -1241,8 +1241,14 @@
my @invoicing_list = grep { $_ !~ /^(POST|FAX)$/ }
$self->cust_main->invoicing_list;
- #better to notify this person than silence
- @invoicing_list = ($invoice_from) unless @invoicing_list;
+ if ( ! @invoicing_list ) { #no recipients
+ if ( $conf->exists('cust_bill-no_recipients-error') ) {
+ die 'No recipients for customer #'. $self->custnum;
+ } else {
+ #default: better to notify this person than silence
+ @invoicing_list = ($invoice_from);
+ }
+ }
my $subject = $self->email_subject($template);
More information about the freeside-commits
mailing list