From: ivan Date: Fri, 17 Jun 2005 05:31:50 +0000 (+0000) Subject: fix preference sort order for linking: sort unaudited services first, secondary sort... X-Git-Tag: SQL_LEDGER_2_4_4~1^2~232 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=6e8f3245e71ed4484d5d289f2a455c9a08a900ee;p=freeside.git fix preference sort order for linking: sort unaudited services first, secondary sort by svcaprt --- diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi index 2a3b3bbf9..c3d79e22c 100755 --- a/httemplate/misc/process/link.cgi +++ b/httemplate/misc/process/link.cgi @@ -19,7 +19,7 @@ unless ( $svcnum ) { $search{$1} = $cgi->param('link_value2'); } - my @svc_x = ( sort { ($b->cust_svc->pkgnum > 0) <=> ($a->cust_svc->pkgnum > 0) + my @svc_x = ( sort { ($a->cust_svc->pkgnum > 0) <=> ($b->cust_svc->pkgnum > 0) or ($b->cust_svc->svcpart == $svcpart) <=> ($a->cust_svc->svcpart == $svcpart) } @@ -31,7 +31,7 @@ unless ( $svcnum ) { "(svcpart $svcpart):\n"; foreach my $svc_x ( @svc_x ) { warn " ". $svc_x->email. - " (svcnum". $svc_x->svcnum. ",". + " (svcnum ". $svc_x->svcnum. ",". " pkgnum ". $svc_x->cust_svc->pkgnum. ",". " svcpart ". $svc_x->cust_svc->svcpart. ")\n"; }