X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event.pm;h=e7acf5af21dbfdd2d49968135807fe01d9271a37;hb=aeb90ade381fc3d5477db0334048c2af623fccfe;hp=b7371c9ab993b7cb1f2dc4e2f4f745005d2741c4;hpb=708baebde34a2442ec41db38902e04f3c6ec4269;p=freeside.git diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index b7371c9ab..e7acf5af2 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 @@ -285,7 +270,9 @@ sub targets { } # 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 ); @@ -583,6 +570,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 ) );