summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_pkg.pm4
-rwxr-xr-xhttemplate/search/cust_main.cgi1
-rwxr-xr-xhttemplate/search/cust_pkg.cgi2
3 files changed, 5 insertions, 2 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index daa3353c1..b1373849f 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -56,9 +56,11 @@ $disable_agentcheck = 0;
$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);
}
}
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 7bcd5bfcd..38ec4f453 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -518,6 +518,7 @@ my $addl_from = qq{
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,
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index f1e686a83..dbd346dba 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -44,7 +44,7 @@
},
sub { my $c = shift;
sprintf( $money_char.'%.2f',
- $c->part_pkg->base_recur($c)
+ $c->base_recur
);
},
sub { FS::part_pkg::freq_pretty(shift); },