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/misc | |
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/misc')
-rwxr-xr-x | httemplate/misc/process/link.cgi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi index 32a5360d9..acdd1ad03 100755 --- a/httemplate/misc/process/link.cgi +++ b/httemplate/misc/process/link.cgi @@ -16,8 +16,11 @@ unless ( $svcnum ) { if ( $cgi->param('link_field2') =~ /^(\w+)$/ ) { $search{$1} = $cgi->param('link_value2'); } - my $svc_x = ( grep { $_->cust_svc->svcpart == $svcpart } - qsearch( $svcdb, \%search ) + my $svc_x = ( sort { ($b->cust_svc->pkgnum > 0) <=> ($a->cust_svc->pkgnum > 0) + or ($b->cust_svc->svcpart == $svcpart) + <=> ($a->cust_svc->svcpart == $svcpart) + } + qsearch( $svcdb, \%search ) )[0]; eidiot("$link_field not found!") unless $svc_x; $svcnum = $svc_x->svcnum; |