diff options
author | ivan <ivan> | 2004-07-30 04:54:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-07-30 04:54:41 +0000 |
commit | 918bbc9ce36a3dc5943f521e26751ea94a5a5539 (patch) | |
tree | 813ee68a86715499f673f884799b6c226f324845 /httemplate/edit/process/cust_svc.cgi | |
parent | c69dd0d922bba433b16e3408f71f1cac0e16a069 (diff) |
svcpart changes now trigger all necessary export actions, manual svcpart changing on svc_acct view, linking changes svcpart if you ask it to, closes: Bug#671, Bug#644
Diffstat (limited to 'httemplate/edit/process/cust_svc.cgi')
-rw-r--r-- | httemplate/edit/process/cust_svc.cgi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_svc.cgi b/httemplate/edit/process/cust_svc.cgi new file mode 100644 index 000000000..187ede5e5 --- /dev/null +++ b/httemplate/edit/process/cust_svc.cgi @@ -0,0 +1,30 @@ +<% + +my $svcnum = $cgi->param('svcnum'); + +my $old = qsearchs('cust_svc',{'svcnum'=>$svcnum}) if $svcnum; + +my $new = new FS::cust_svc ( { + map { + $_, scalar($cgi->param($_)); + } fields('cust_svc') +} ); + +my $error; +if ( $svcnum ) { + $error=$new->replace($old); +} else { + $error=$new->insert; + $svcnum=$new->getfield('svcnum'); +} + +if ( $error ) { + #$cgi->param('error', $error); + #print $cgi->redirect(popurl(2). "cust_svc.cgi?". $cgi->query_string ); + eidiot($error); +} else { + my $svcdb = $new->part_svc->svcdb; + print $cgi->redirect(popurl(3). "view/$svcdb.cgi?$svcnum"); +} + + |