1 package FS::part_event::Condition::pkg_contract_date;
2 use base qw( FS::part_event::Condition );
7 'Package contract date nearing';
10 sub eventtable_hashref {
19 'within' => { 'label' => 'Package contract date with in',
26 my( $self, $cust_pkg, %opt ) = @_;
28 my $contract_end_date = $cust_pkg->contract_end ? $cust_pkg->contract_end : 0;
29 my $contract_within_time = $self->option_age_from('within', $contract_end_date );
31 $opt{'time'} >= $contract_within_time and $contract_within_time > 0;