}
}
-=item targets
+=item targets OPTIONS
Returns all objects (of type C<FS::eventtable>, for this object's
C<eventtable>) eligible for processing under this event, as of right now.
sub targets {
my $self = shift;
- my $time = time; # $opt{'time'}?
+ my %opt = @_;
+ my $time = $opt{'time'} || time;
my $eventpart = $self->eventpart;
$eventpart =~ /^\d+$/ or die "bad eventpart $eventpart";
}
# this is the 'event' side
- my $join = FS::part_event_condition->join_conditions_sql( $eventtable );
+ my $join = FS::part_event_condition->join_conditions_sql( $eventtable,
+ 'time' => $time
+ );
my $where = FS::part_event_condition->where_conditions_sql( $eventtable,
'time' => $time
);
'cust_pkg' => 'Package',
'cust_bill' => 'Invoice',
'cust_main' => 'Customer',
+ 'cust_pay' => 'Payment',
'cust_pay_batch' => 'Batch payment',
'cust_statement' => 'Statement', #too general a name here? "Invoice group"?
- 'svc_acct' => 'Login service',
+ 'svc_acct' => 'Account service (svc_acct)',
;
\%hash
'cust_main' => 'custnum',
'cust_bill' => 'invnum',
'cust_pkg' => 'pkgnum',
+ 'cust_pay' => 'paynum',
'cust_pay_batch' => 'paybatchnum',
'cust_statement' => 'statementnum',
'svc_acct' => 'svcnum',
(
map { $_ => $actions{$_} }
sort { $actions{$a}->{'default_weight'}<=>$actions{$b}->{'default_weight'} }
+ # || $actions{$a}->{'description'} cmp $actions{$b}->{'description'} }
$class->all_actions( $eventtable )
);