}
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)) {
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')