diff options
author | ivan <ivan> | 2001-07-30 07:36:04 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-07-30 07:36:04 +0000 |
commit | 51984ac3d3da3006809c6866fdecd4ad83610731 (patch) | |
tree | ac16f533c25a1947eee7bee226fed5638c42bd94 /httemplate/edit/process/part_svc.cgi | |
parent | 9c2016b3a564d439960420114ce6f4cab3bf723b (diff) |
templates!!!
Diffstat (limited to 'httemplate/edit/process/part_svc.cgi')
-rwxr-xr-x | httemplate/edit/process/part_svc.cgi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/httemplate/edit/process/part_svc.cgi b/httemplate/edit/process/part_svc.cgi new file mode 100755 index 000000000..4c972e4d7 --- /dev/null +++ b/httemplate/edit/process/part_svc.cgi @@ -0,0 +1,30 @@ +<% + +my $svcpart = $cgi->param('svcpart'); + +my $old = qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart; + +my $new = new FS::part_svc ( { + map { + $_, scalar($cgi->param($_)); +# } qw(svcpart svc svcdb) + } fields('part_svc') +} ); + +my $error; +if ( $svcpart ) { + $error = $new->replace($old); +} else { + $error = $new->insert; + $svcpart=$new->getfield('svcpart'); +} + +if ( $error ) { + $cgi->param('error', $error); + $Response->Redirect(popurl(2). "part_svc.cgi?". $cgi->query_string ); +} else { + warn "redirecting to ". popurl(3)."browse/part_svc.cgi via $Response"; + $Response->Redirect(popurl(3)."browse/part_svc.cgi"); +} + +%> |