blob: 46ad74d62d39ceebb98b785a373cdf4a37d09855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<%
my $popnum = $cgi->param('popnum');
my $old = qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum;
my $new = new FS::svc_acct_pop ( {
map {
$_, scalar($cgi->param($_));
} fields('svc_acct_pop')
} );
my $error = '';
if ( $popnum ) {
$error = $new->replace($old);
} else {
$error = $new->insert;
$popnum=$new->getfield('popnum');
}
if ( $error ) {
$cgi->param('error', $error);
print $cgi->redirect(popurl(2). "svc_acct_pop.cgi?". $cgi->query_string );
} else {
print $cgi->redirect(popurl(3). "browse/svc_acct_pop.cgi");
}
%>
|