summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-01-28 16:23:40 -0800
committerIvan Kohler <ivan@freeside.biz>2016-01-28 16:23:40 -0800
commit5f7ce7b22d70058613be046ee67778d6d9969fd9 (patch)
treec56bdaaff0f200e329d2e99825564393d8e5aedd /FS/FS/cust_pkg.pm
parentbbc082b0295335839b6e52ebc46941905165f202 (diff)
optimize Reports->Customers->List Customers, RT#20173
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r--FS/FS/cust_pkg.pm25
1 files changed, 16 insertions, 9 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index c507a45..6dcd740 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -56,18 +56,25 @@ our ($disable_agentcheck, $DEBUG, $me, $import) = (0, 0, '[FS::cust_pkg]', 0);
our $upgrade = 0; #go away after setup+start dates cleaned up for old customers
-sub _cache {
- my $self = shift;
- my ( $hashref, $cache ) = @_;
- #if ( $hashref->{'pkgpart'} ) {
+sub _simplecache {
+ my( $self, $hashref ) = @_;
if ( $hashref->{'pkg'} ) {
- # #@{ $self->{'_pkgnum'} } = ();
- # my $subcache = $cache->subcache('pkgpart', 'part_pkg');
- # $self->{'_pkgpart'} = $subcache;
- # #push @{ $self->{'_pkgnum'} },
- # FS::part_pkg->new_or_cached($hashref, $subcache);
$self->{'_pkgpart'} = FS::part_pkg->new($hashref);
}
+}
+
+sub _cache {
+ my $self = shift;
+ my ( $hashref, $cache ) = @_;
+# #if ( $hashref->{'pkgpart'} ) {
+# if ( $hashref->{'pkg'} ) {
+# # #@{ $self->{'_pkgnum'} } = ();
+# # my $subcache = $cache->subcache('pkgpart', 'part_pkg');
+# # $self->{'_pkgpart'} = $subcache;
+# # #push @{ $self->{'_pkgnum'} },
+# # FS::part_pkg->new_or_cached($hashref, $subcache);
+# $self->{'_pkgpart'} = FS::part_pkg->new($hashref);
+# }
if ( exists $hashref->{'svcnum'} ) {
#@{ $self->{'_pkgnum'} } = ();
my $subcache = $cache->subcache('svcnum', 'cust_svc', $hashref->{pkgnum});