RT#40641: unprovisioning preserved cancelled services [fixed for cust_svc without...
[freeside.git] / httemplate / search / svc_acct.cgi
index ef89f01..ecf37b4 100755 (executable)
@@ -356,11 +356,14 @@ foreach my $pkg_field ( @pkg_fields ) {
 push @header, emt('Pkg. Status');
 push @fields, sub {
   $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+  return '' unless $cust_pkg_cache{$_[0]->svcnum};
   $cust_pkg_cache{$_[0]->svcnum}->ucfirst_status;
 };
 push @links, '';
 $align .= 'r';
 push @color, sub {
+  $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+  return '' unless $cust_pkg_cache{$_[0]->svcnum};
   my $c = FS::cust_pkg::statuscolors;
   $c->{$cust_pkg_cache{$_[0]->svcnum}->status };
 };