X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event.pm;h=9354f4d1e4d7ee5e0aafe3d6d59b270f58753506;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=31d2afd239aeafb969dcbde46efaa366a995939e;hpb=c6e4f9460f44a7440ef2fa7e67ed51dfe40a7668;p=freeside.git diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index 31d2afd23..9354f4d1e 100644 --- a/FS/FS/part_event.pm +++ b/FS/FS/part_event.pm @@ -9,7 +9,6 @@ use FS::Conf; use FS::part_event_option; use FS::part_event_condition; use FS::cust_event; -use FS::agent; $DEBUG = 0; @@ -169,13 +168,6 @@ sub _rebless { Returns the conditions associated with this event, as FS::part_event_condition objects (see L) -=cut - -sub part_event_condition { - my $self = shift; - qsearch( 'part_event_condition', { 'eventpart' => $self->eventpart } ); -} - =item new_cust_event OBJECT, [ OPTION => VALUE ] Creates a new customer event (see L) for the provided object. @@ -223,13 +215,6 @@ sub reasontext { confess "part_event->reasontext deprecated"; } Returns the associated agent for this event, if any, as an FS::agent object. -=cut - -sub agent { - my $self = shift; - qsearchs('agent', { 'agentnum' => $self->agentnum } ); -} - =item templatename Returns the alternate invoice template name, if any, or false if there is @@ -253,7 +238,7 @@ sub templatename { } } -=item targets +=item targets OPTIONS Returns all objects (of type C, for this object's C) eligible for processing under this event, as of right now. @@ -268,7 +253,8 @@ but can be useful when configuring events. 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"; @@ -582,6 +568,7 @@ sub actions { ( map { $_ => $actions{$_} } sort { $actions{$a}->{'default_weight'}<=>$actions{$b}->{'default_weight'} } + # || $actions{$a}->{'description'} cmp $actions{$b}->{'description'} } $class->all_actions( $eventtable ) );