optimize Reports->Customers->List Customers, RT#20173
[freeside.git] / FS / FS / part_svc.pm
index 08003dd..612c590 100644 (file)
@@ -565,6 +565,9 @@ is specified as B<0>, returns the number of unlinked customer services.
 sub num_cust_svc {
   my $self = shift;
 
+  return $self->{Hash}{num_cust_svc}
+    if !@_ && exists($self->{Hash}{num_cust_svc});
+
   my @param = ( $self->svcpart );
 
   my( $join, $and ) = ( '', '' );