1 package FS::part_event::Condition::cust_bill_age;
4 use base qw( FS::part_event::Condition );
6 sub description { 'Invoice age'; }
8 sub eventtable_hashref {
17 'age' => { label=>'Age', type=>'freq', },
22 my( $self, $cust_bill, %opt ) = @_;
24 my $age = $self->option_age_from('age', $opt{'time'} );
26 ( $cust_bill->_date - 60 ) <= $age;
31 my( $class, $table, %opt ) = @_;
33 my $age = $class->condition_sql_option_age_from('age', $opt{'time'} );
35 "( cust_bill._date - 60 ) <= $age";
39 shift->condition_sql_option_age('age');
42 sub order_sql_weight {