From: ivan Date: Fri, 31 Mar 2006 23:22:08 +0000 (+0000) Subject: quick sort fix for billing events X-Git-Tag: BEFORE_FINAL_MASONIZE~185 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9719693a031bee8d35dffa7ea543f27a25443309 quick sort fix for billing events --- diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi index 380e4d78b..91e31d832 100755 --- a/httemplate/browse/part_bill_event.cgi +++ b/httemplate/browse/part_bill_event.cgi @@ -31,13 +31,14 @@ my $total = scalar(@part_bill_event); foreach my $payby ( keys %payby ) { my $oldfreq = ''; - my @payby_part_bill_event = grep { $payby eq $_->payby } - sort { $a->freq cmp $b->freq # for now - || $a->seconds <=> $b->seconds - || $a->weight <=> $b->weight - || $a->eventpart <=> $b->eventpart - } - @part_bill_event; + my @payby_part_bill_event = + grep { $payby eq $_->payby } + sort { ( $a->freq || '1d') cmp ( $b->freq || '1d' ) # for now + || $a->seconds <=> $b->seconds + || $a->weight <=> $b->weight + || $a->eventpart <=> $b->eventpart + } + @part_bill_event; %>