diff options
author | Mark Wells <mark@freeside.biz> | 2012-03-12 20:24:22 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-03-12 20:24:22 -0700 |
commit | fdd00d4549faaa9de8952402f77fa86d0b8b22ee (patch) | |
tree | b45dc5430ace293ad93d8b97b9527420b3558748 /FS/FS/part_event.pm | |
parent | 5665d202b0b91bb9ad685c209265b7a3405de768 (diff) |
"day-of-month of customer signup" condition, #16827
Diffstat (limited to 'FS/FS/part_event.pm')
-rw-r--r-- | FS/FS/part_event.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index 31d2afd23..62f16fa1c 100644 --- a/FS/FS/part_event.pm +++ b/FS/FS/part_event.pm @@ -253,7 +253,7 @@ sub templatename { } } -=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. @@ -268,7 +268,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"; @@ -305,8 +306,8 @@ sub targets { }); my @tested_objects; foreach my $object ( @objects ) { - my $cust_event = $self->new_cust_event($object, 'time' => $time); - next unless $cust_event->test_conditions; + my $cust_event = $self->new_cust_event($object); + next unless $cust_event->test_conditions('time' => $time); $object->set('cust_event', $cust_event); push @tested_objects, $object; |