diff options
Diffstat (limited to 'FS/FS/part_pkg/delayed_Mixin.pm')
-rw-r--r-- | FS/FS/part_pkg/delayed_Mixin.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/part_pkg/delayed_Mixin.pm b/FS/FS/part_pkg/delayed_Mixin.pm index 027cfff..4228a4a 100644 --- a/FS/FS/part_pkg/delayed_Mixin.pm +++ b/FS/FS/part_pkg/delayed_Mixin.pm @@ -25,7 +25,7 @@ use vars qw(%info); sub calc_setup { my($self, $cust_pkg, $time ) = @_; - unless ( $self->option('delay_setup') ) { + unless ( $self->option('delay_setup', 1) ) { my $d = $cust_pkg->bill || $time; $d += 86400 * $self->option('free_days'); $cust_pkg->bill($d); @@ -37,7 +37,7 @@ sub calc_setup { sub calc_remain { my ($self, $cust_pkg, %options) = @_; - unless ( $self->option('delay_setup') ) { + unless ( $self->option('delay_setup', 1) ) { my $last_bill = $cust_pkg->last_bill || 0; my $next_bill = $cust_pkg->getfield('bill') || 0; my $free_days = $self->option('free_days'); @@ -49,4 +49,6 @@ sub calc_remain { return $self->SUPER::calc_remain($cust_pkg, %options); } +sub can_start_date { ! shift->option('delay_setup', 1) } + 1; |