X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event.pm;h=62d96f97aa9ddb226787047968f2aeee4e77b961;hb=aba308a52b4cf39e9bd84301514b45734f540260;hp=62f16fa1c8cf8ee419deb90eb7beb50c4808de48;hpb=7d68066ea33f9f85fe14ce663372642d7ec2ad20;p=freeside.git diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index 62f16fa1c..62d96f97a 100644 --- a/FS/FS/part_event.pm +++ b/FS/FS/part_event.pm @@ -285,7 +285,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 ); @@ -306,8 +308,8 @@ sub targets { }); my @tested_objects; foreach my $object ( @objects ) { - my $cust_event = $self->new_cust_event($object); - next unless $cust_event->test_conditions('time' => $time); + my $cust_event = $self->new_cust_event($object, 'time' => $time); + next unless $cust_event->test_conditions; $object->set('cust_event', $cust_event); push @tested_objects, $object; @@ -382,6 +384,7 @@ sub eventtable_labels { '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', @@ -421,6 +424,7 @@ sub eventtable_pkey { 'cust_main' => 'custnum', 'cust_bill' => 'invnum', 'cust_pkg' => 'pkgnum', + 'cust_pay' => 'paynum', 'cust_pay_batch' => 'paybatchnum', 'cust_statement' => 'statementnum', 'svc_acct' => 'svcnum', @@ -583,6 +587,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 ) );