@@ -, +, @@ --- svc/checkouts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/svc/checkouts +++ a/svc/checkouts @@ -247,7 +247,9 @@ while ( my $c = $sth->fetchrow_hashref() ) { @checkouts_today = reverse(@checkouts_today) unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest -@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; # latest to earliest +@checkouts_previous = + sort { $a->{date_due} eq $b->{date_due} ? $a->{timestamp} cmp $b->{timestamp} : $a->{date_due} cmp $b->{date_due} } + @checkouts_previous; # latest to earliest @checkouts_previous = reverse(@checkouts_previous) unless ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest --