X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fsvc_acct.cgi;h=728f2c25f746fe6aaea6ff71db8cf46fc8d64c19;hb=861d622575ae8274d4171dd029432fd9be29c2ca;hp=b2ed723e229f286b234582e49e06337963a4a563;hpb=abfd68d00c867c64c033915374f8fc6b1ff7e6d2;p=freeside.git diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index b2ed723e2..728f2c25f 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -1,5 +1,7 @@ <% +my $mydomain = ''; + my $conf = new FS::Conf; my $maxrecords = $conf->config('maxsearchrecordsperpage'); @@ -30,7 +32,7 @@ if ( $query =~ /^UN_(.*)$/ ) { WHERE 0 < ( SELECT count(*) FROM cust_svc WHERE cust_svc.svcnum = svc_acct.svcnum - AND ( pkgnum IS NULL OR pkgnum = 0 OR pkgnum = $empty ) + AND ( pkgnum IS NULL OR pkgnum = 0 ) ) "; } @@ -145,8 +147,14 @@ END $domain = "svcnum. "\">". $svc_domain->domain. ""; } else { - die "No svc_domain.svcnum record for svc_acct.domsvc: ". - $svc_acct->domsvc; + unless ( $mydomain ) { + my $conf = new FS::Conf; + unless ( $mydomain = $conf->config('domain') ) { + die "No legacy domain config file and no svc_domain.svcnum record ". + "for svc_acct.domsvc: ". $svc_acct->domsvc; + } + } + $domain = "$mydomain*"; } my($cust_pkg,$cust_main); if ( $cust_svc->pkgnum ) { @@ -208,8 +216,17 @@ END } - print "$pager
". - ''; + print "$pager
"; + + if ( $mydomain ) { + print "
* The $mydomain domain ". + "is contained in your legacy domain ". + "configuration file. ". + "You should run the bin/fs-migrate-svc_acct_sm script ". + "to create a proper svc_domain record for this domain."; + } + + print ''; }