[freeside-commits] freeside/FS/FS Conf.pm, 1.177, 1.178 svc_acct.pm, 1.211, 1.212 cust_main.pm, 1.266, 1.267

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Jan 30 11:40:11 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv9865

Modified Files:
	Conf.pm svc_acct.pm cust_main.pm 
Log Message:
only add first user to invoicing_list (ticket 1424)

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- Conf.pm	23 Jan 2007 23:42:59 -0000	1.177
+++ Conf.pm	30 Jan 2007 19:40:08 -0000	1.178
@@ -559,6 +559,13 @@
   },
 
   {
+    'key'         => 'emailinvoiceautoalways',
+    'section'     => 'billing',
+    'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
+    'type'       => 'checkbox',
+  },
+
+  {
     'key'         => 'exclude_ip_addr',
     'section'     => '',
     'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- svc_acct.pm	2 Jan 2007 18:38:02 -0000	1.211
+++ svc_acct.pm	30 Jan 2007 19:40:08 -0000	1.212
@@ -453,7 +453,10 @@
   if ( $cust_pkg ) {
     my $cust_main = $cust_pkg->cust_main;
 
-    if ( $conf->exists('emailinvoiceauto') ) {
+    if (   $conf->exists('emailinvoiceautoalways')
+        || $conf->exists('emailinvoiceauto')
+        && $cust_main->invoicing_list_emailonly
+       ) {
       my @invoicing_list = $cust_main->invoicing_list;
       push @invoicing_list, $self->email;
       $cust_main->invoicing_list(\@invoicing_list);

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -d -r1.266 -r1.267
--- cust_main.pm	29 Jan 2007 16:16:49 -0000	1.266
+++ cust_main.pm	30 Jan 2007 19:40:09 -0000	1.267
@@ -2531,8 +2531,10 @@
     $payname =  "$payfirst $paylast";
   }
 
+  # invoicing_list_emailonly instead? push one?  which one?
   my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list;
-  if ( $conf->exists('emailinvoiceauto')
+  if ( $conf->exists('emailinvoiceautoalways')
+       || $conf->exists('emailinvoiceauto') && ! @invoicing_list
        || ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) {
     push @invoicing_list, $self->all_emails;
   }
@@ -3017,8 +3019,10 @@
     $payname =  "$payfirst $paylast";
   }
 
+  # invoicing_list_emailonly instead? push one?  which one?
   my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list;
-  if ( $conf->exists('emailinvoiceauto')
+  if ( $conf->exists('emailinvoiceautoalways')
+       || $conf->exists('emailinvoiceauto') && ! @invoicing_list
        || ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) {
     push @invoicing_list, $self->all_emails;
   }



More information about the freeside-commits mailing list