From 8a740c7cbe6fbd54b33dc5442cbc92bd3f838042 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 25 Aug 2008 11:51:25 -0500 Subject: [PATCH] fix number two for bug 1204: Lists of issues and overdues on opac-user.pl This makes opac-user.pl sort the output from GetPendingIssues itself, by descend ing due date. Signed-off-by: Galen Charlton --- opac/opac-user.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 6aefc6d19d..04d0c9eaf8 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -82,6 +82,7 @@ $template->param( BORROWER_INFO => \@bordat, #get issued items .... my ($countissues,$issues) = GetPendingIssues($borrowernumber); +my @issue_list = sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues; my $count = 0; my $toggle = 0; @@ -89,7 +90,7 @@ my $overdues_count = 0; my @overdues; my @issuedat; my $itemtypes = GetItemTypes(); -foreach my $issue ( @$issues ) { +foreach my $issue ( @issue_list ) { if($count%2 eq 0){ $issue->{'toggle'} = 1; } else { $issue->{'toggle'} = 0; } # check for reserves my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} ); -- 2.39.5