our $upgrade = 0; #go away after setup+start dates cleaned up for old customers
+our $cache_enabled = 0;
+
sub _simplecache {
my( $self, $hashref ) = @_;
- if ( $hashref->{'pkg'} ) {
+ if ( $cache_enabled && $hashref->{'pkg'} && $hashref->{'plan'} ) {
$self->{'_pkgpart'} = FS::part_pkg->new($hashref);
}
}
AND recur_option.optionname = 'recur_fee' )
};
+local($FS::cust_pkg::cache_enabled) = 1; #for $cust_pkg->part_pkg
my %all_pkgs = map { $_->custnum =>
[ $_->$pkgs_method({ select => $select,
addl_from => $addl_from,
},
sub { my $c = shift;
sprintf( $money_char.'%.2f',
- $c->part_pkg->base_recur($c)
+ $c->base_recur
);
},
sub { FS::part_pkg::freq_pretty(shift); },