From: Ivan Kohler Date: Fri, 12 Dec 2014 23:37:24 +0000 (-0800) Subject: proper fix for signupdate_age that works in customer context too, RT#31213 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=d8230051d701b0e6105b7196a328dfaac980609b;hp=965a053f2a74114c605b50bfefd0dcc168fb1bd5;p=freeside.git proper fix for signupdate_age that works in customer context too, RT#31213 --- diff --git a/FS/FS/part_event/Condition/signupdate_age.pm b/FS/FS/part_event/Condition/signupdate_age.pm index 0c78b4c10..0cfe55063 100644 --- a/FS/FS/part_event/Condition/signupdate_age.pm +++ b/FS/FS/part_event/Condition/signupdate_age.pm @@ -14,11 +14,11 @@ sub option_fields { } sub condition { - my( $self, $cust_bill, %opt ) = @_; + my( $self, $object, %opt ) = @_; my $age = $self->option_age_from('age', $opt{'time'} ); - my $cust_main = $cust_bill->cust_main; + my $cust_main = $self->cust_main($object); ( $cust_main->signupdate - 60 ) <= $age; }