[freeside-commits] branch FREESIDE_3_BRANCH updated. 34c9b9f788546382cfa1164d9039876932475f7c

Ivan ivan at 420.am
Tue May 19 14:57:34 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  34c9b9f788546382cfa1164d9039876932475f7c (commit)
      from  a4da08852e2b5f30bbb8926ddd4310ce1f128449 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 34c9b9f788546382cfa1164d9039876932475f7c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 19 14:57:33 2015 -0700

    add "skip customers without postal billing" option to invoice spool csv event, RT#35023

diff --git a/FS/FS/part_event/Action/cust_bill_spool_csv.pm b/FS/FS/part_event/Action/cust_bill_spool_csv.pm
index 250c830..0d84e77 100644
--- a/FS/FS/part_event/Action/cust_bill_spool_csv.pm
+++ b/FS/FS/part_event/Action/cust_bill_spool_csv.pm
@@ -33,6 +33,10 @@ sub option_fields {
                              empty_label => '(do not upload)',
                              order_by => 'targetnum',
                            },
+    'skip_nopost' => { label => 'Skip customers without postal billing enabled',
+                       type  => 'checkbox',
+                       value => 'Y',
+                     },
   );
 }
 
@@ -44,6 +48,9 @@ sub do_action {
   #my $cust_main = $self->cust_main($cust_bill);
   my $cust_main = $cust_bill->cust_main;
 
+  return if $self->option('skip_nopost')
+         && ! grep { $_ eq 'POST' } $cust_main->invoicing_list;
+
   $cust_bill->spool_csv(
     'time'         => $cust_event->_date,
     'format'       => $self->option('spoolformat'),

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_event/Action/cust_bill_spool_csv.pm |    7 +++++++
 1 file changed, 7 insertions(+)




More information about the freeside-commits mailing list