diff options
author | ivan <ivan> | 2002-02-09 17:45:26 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-02-09 17:45:26 +0000 |
commit | 4c18a45810f000bb013d23d4738cfca012794c4b (patch) | |
tree | 84e8d9b4245795193672dd858eda6949d61246fd /httemplate/misc | |
parent | 5bb9eff0716710611f50071bec6167b4514edb48 (diff) |
have FS::cust_svc::check look up & check pkg_svc.quantity
like httemplate/view/cust_pkg.cgi (closes: Bug#43)
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/process/link.cgi | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi index 80a5de81f..f8b7812e1 100755 --- a/httemplate/misc/process/link.cgi +++ b/httemplate/misc/process/link.cgi @@ -1,4 +1,4 @@ -<!-- $Id: link.cgi,v 1.3 2002-01-30 14:18:09 ivan Exp $ --> +<!-- $Id: link.cgi,v 1.4 2002-02-09 17:45:26 ivan Exp $ --> <% $cgi->param('pkgnum') =~ /^(\d+)$/; @@ -12,13 +12,14 @@ 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_acct)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') }); - eidiot("$link_field not found!") unless $svc_acct; - $svcnum=$svc_acct->svcnum; + 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, |