1 package FS::part_event::Action::cust_bill_suspend_if_balance;
4 use base qw( FS::part_event::Action );
6 sub description { 'Suspend if balance (this invoice and previous) over'; }
10 sub eventtable_hashref {
16 'balanceover' => { label=>'Balance over', type=>'money', }, # size=>7 },
17 'reasonnum' => { 'label' => 'Reason',
18 'type' => 'select-reason',
19 'reason_class' => 'S',
24 sub default_weight { 10; }
27 my( $self, $cust_bill ) = @_;
29 #my $cust_main = $self->cust_main($cust_bill);
30 my $cust_main = $cust_bill->cust_main;
32 my @err = $cust_bill->cust_suspend_if_balance_over(
33 $self->option('balanceover'),
34 'reason' => $self->option('reasonnum'),
37 die join(' / ', @err) if scalar(@err);