% include("/elements/header.html","Link to existing $svc") %>
<% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('View/link unlinked services'); my %link_field = ( 'svc_acct' => 'username', 'svc_domain' => 'domain', 'svc_phone' => 'phonenum', ); my %link_field2 = ( 'svc_acct' => { label => 'Domain', field => 'domsvc', type => 'select', select_table => 'svc_domain', select_key => 'svcnum', select_label => 'domain' }, ); $cgi->param('pkgnum') =~ /^(\d+)$/ or die 'unparsable pkgnum'; my $pkgnum = $1; $cgi->param('svcpart') =~ /^(\d+)$/ or die 'unparsable svcpart'; my $svcpart = $1; my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); my $svc = $part_svc->getfield('svc'); my $svcdb = $part_svc->getfield('svcdb'); my $link_field = $link_field{$svcdb}; my $link_field2 = $link_field2{$svcdb}; %init>