diff options
Diffstat (limited to 'FS/FS/part_event/Condition/pkg_age_Common.pm')
-rw-r--r-- | FS/FS/part_event/Condition/pkg_age_Common.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/FS/FS/part_event/Condition/pkg_age_Common.pm b/FS/FS/part_event/Condition/pkg_age_Common.pm index 0f3b9efb4..726b01d70 100644 --- a/FS/FS/part_event/Condition/pkg_age_Common.pm +++ b/FS/FS/part_event/Condition/pkg_age_Common.pm @@ -40,7 +40,7 @@ sub option_fields { sub condition { my( $self, $cust_pkg, %opt ) = @_; - my $age = $self->option_age_from('age', $opt{'time'} ); + my $age = $self->pkg_age_age( $cust_pkg, %opt ); my $pkg_date = $cust_pkg->get( $self->option('field') ); @@ -48,6 +48,13 @@ sub condition { } +sub pkg_age_age { + my( $self, $cust_pkg, %opt ); + $self->option_age_from('age', $opt{'time'} ); +} + +#doesn't work if you override pkg_age_age, +# so if you do, override this with at least a stub that returns 'true' sub condition_sql { my( $class, $table, %opt ) = @_; my $age = $class->condition_sql_option_age_from('age', $opt{'time'}); |