diff options
author | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 |
commit | 160be29a0dc62e79a4fb95d2ab8c0c7e5996760e (patch) | |
tree | 94ebadb17321b138fd7bfd9a5c379eec97c5d328 /httemplate/misc/process/link.cgi | |
parent | 3ef62a0570055da710328937e7f65dbb2c027c62 (diff) |
This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'.
Diffstat (limited to 'httemplate/misc/process/link.cgi')
-rwxr-xr-x | httemplate/misc/process/link.cgi | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi deleted file mode 100755 index 4b220a867..000000000 --- a/httemplate/misc/process/link.cgi +++ /dev/null @@ -1,40 +0,0 @@ -<% - -$cgi->param('pkgnum') =~ /^(\d+)$/; -my $pkgnum = $1; -$cgi->param('svcpart') =~ /^(\d+)$/; -my $svcpart = $1; -$cgi->param('svcnum') =~ /^(\d*)$/; -my $svcnum = $1; - -unless ( $svcnum ) { - my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart}); - my($svcdb) = $part_svc->getfield('svcdb'); - $cgi->param('link_field') =~ /^(\w+)$/; my($link_field)=$1; - my($svc_x)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') }); - eidiot("$link_field not found!") unless $svc_x; - $svcnum=$svc_x->svcnum; -} - -my $old = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -die "svcnum not found!" unless $old; -#die "svcnum $svcnum already linked to package ". $old->pkgnum if $old->pkgnum; -my $new = new FS::cust_svc ({ - 'svcnum' => $svcnum, - 'pkgnum' => $pkgnum, - 'svcpart' => $svcpart, -}); - -my $error = $new->replace($old); - -unless ($error) { - #no errors, so let's view this customer. - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum"); -} else { -%> -<!-- mason kludge --> -<% - idiot($error); -} - -%> |