1 package FS::part_event::Condition::pkg_balance_under;
6 use base qw( FS::part_event::Condition );
8 sub description { 'Package balance (under)'; }
12 'balance' => { 'label' => 'Balance under (or equal to)',
14 'value' => '0.00', #default
19 sub eventtable_hashref {
24 my($self, $cust_pkg) = @_;
26 my $cust_main = $self->cust_main($cust_pkg);
28 my $under = $self->option('balance');
29 $under = 0 unless length($under);
31 $cust_main->balance_pkgnum($cust_pkg->pkgnum) <= $under;