diff --git a/svc/checkouts b/svc/checkouts index 9a1b3a5648..5bc985a564 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -239,13 +239,13 @@ while ( my $c = $sth->fetchrow_hashref() ) { } -@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today; +@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today; # latest to earliest @checkouts_today = reverse(@checkouts_today) - unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); + unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest -@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; +@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; # latest to earliest @checkouts_previous = reverse(@checkouts_previous) - if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); + unless ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest my @checkouts = ( @checkouts_today, @checkouts_previous );