3 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
6 my $old = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum;
8 #unmunge domsvc and domuid
9 #$cgi->param('domsvc',(split(/:/, $cgi->param('domsvc') ))[0] );
10 #$cgi->param('domuid',(split(/:/, $cgi->param('domuid') ))[0] );
12 my $new = new FS::svc_acct_sm ( {
14 ($_, scalar($cgi->param($_)));
15 #} qw(svcnum pkgnum svcpart domuser domuid domsvc)
16 } ( fields('svc_acct_sm'), qw( pkgnum svcpart ) )
21 $error = $new->replace($old);
23 $error = $new->insert;
24 $svcnum = $new->getfield('svcnum');
28 $cgi->param('error', $error);
29 print $cgi->redirect(popurl(2). "svc_acct_sm.cgi?". $cgi->query_string );
31 print $cgi->redirect(popurl(3). "view/svc_acct_sm.cgi?$svcnum");