X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fflat_introrate.pm;h=4c9abebc9d2936f73fb6d983155af61a30fdda8f;hb=57bb423fe457ba4e13726877f53bcdf944f828f8;hp=e43a525d2e5497a84d50bae0369ca054f5229b2e;hpb=a2ecb1cf6a6c084c521710f1256da082f70ba9e5;p=freeside.git diff --git a/FS/FS/part_pkg/flat_introrate.pm b/FS/FS/part_pkg/flat_introrate.pm index e43a525d2..4c9abebc9 100644 --- a/FS/FS/part_pkg/flat_introrate.pm +++ b/FS/FS/part_pkg/flat_introrate.pm @@ -73,15 +73,15 @@ sub intro_end { } sub base_recur { - my($self, $cust_pkg, $time ) = @_; + my($self, $cust_pkg, $sdate ) = @_; my $now; - if (!$time) { # the "$sdate" from _make_lines + if (!$sdate) { # the "$sdate" from _make_lines my $log = FS::Log->new('FS::part_pkg'); $log->warning("flat_introrate base_recur requires date!"); $now = time; } else { - $now = $$time; + $now = $$sdate; } if ($now < $self->intro_end($cust_pkg)) { @@ -94,7 +94,7 @@ sub base_recur { sub item_discount { my ($self, $cust_pkg) = @_; - return unless $self->option('show_as_discount'); + return unless $self->option('show_as_discount',1); my $intro_end = $self->intro_end($cust_pkg); my $amount = sprintf('%.2f', $self->option('intro_fee') - $self->option('recur_fee')