summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-05-19 14:57:32 -0700
committerIvan Kohler <ivan@freeside.biz>2015-05-19 14:57:32 -0700
commit88dbd0c961480b879faa6e8a0556202f41e8202f (patch)
treecd4b2a0eca0450fa9dce18c7553c61da3d7257a6 /FS/FS/part_event/Action
parentb0575176cbc7fec3f44d0e924bb0e4791bb732ec (diff)
add "skip customers without postal billing" option to invoice spool csv event, RT#35023
Diffstat (limited to 'FS/FS/part_event/Action')
-rw-r--r--FS/FS/part_event/Action/cust_bill_spool_csv.pm7
1 files changed, 7 insertions, 0 deletions
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'),