1 package FS::part_event::Action::cust_bill_suspend_if_balance;
4 use base qw( FS::part_event::Action );
7 'Suspend if balance (this invoice and previous) over';
14 sub eventtable_hashref {
20 'balanceover' => { label=>'Balance over', type=>'money', }, # size=>7 },
21 'reasonnum' => { 'label' => 'Reason',
22 'type' => 'select-reason',
23 'reason_class' => 'S',
33 my( $self, $cust_bill ) = @_;
35 #my $cust_main = $self->cust_main($cust_bill);
36 my $cust_main = $cust_bill->cust_main;
38 my @err = $cust_bill->cust_suspend_if_balance_over(
39 $self->option('balanceover'),
40 'reason' => $self->option('reasonnum'),
43 die join(' / ', @err) if scalar(@err);