summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-12-28 15:25:35 -0800
committerIvan Kohler <ivan@freeside.biz>2014-12-28 15:25:35 -0800
commitacd5ab13c00e473b63891f4db8443af99f5404c5 (patch)
treec89f11011cd484f8cddc03f5ec47963f74dbadc2 /FS/FS/part_event/Action
parent357211ff7f54864dbc04876db6e84580e02e807c (diff)
add option to skip customers without postal invocing to print event instead of the condition, RT#32648
Diffstat (limited to 'FS/FS/part_event/Action')
-rw-r--r--FS/FS/part_event/Action/cust_bill_print.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/part_event/Action/cust_bill_print.pm b/FS/FS/part_event/Action/cust_bill_print.pm
index ea6e0aa..8a9d369 100644
--- a/FS/FS/part_event/Action/cust_bill_print.pm
+++ b/FS/FS/part_event/Action/cust_bill_print.pm
@@ -14,6 +14,9 @@ sub option_fields {
'modenum' => { label => 'Invoice mode',
type => 'select-invoice_mode',
},
+ 'skip_nopost' => { label => 'Skip customers without postal billing enabled',
+ type => 'checkbox',
+ },
);
}
@@ -26,7 +29,8 @@ sub do_action {
my $cust_main = $cust_bill->cust_main;
$cust_bill->set('mode' => $self->option('modenum'));
- $cust_bill->print;
+ $cust_bill->print unless $self->option('skip_nopost')
+ && ! grep { $_ eq 'POST' } $cust_main->invoicing_list;
}
1;