Lines 204-216
while ( my $c = $sth->fetchrow_hashref() ) {
Link Here
|
204 |
} |
204 |
} |
205 |
} |
205 |
} |
206 |
|
206 |
|
|
|
207 |
|
208 |
@checkouts_today = sort { $a->{timstamp} cmp $b->{timestamp} } @checkouts_today; |
207 |
@checkouts_today = reverse(@checkouts_today) |
209 |
@checkouts_today = reverse(@checkouts_today) |
208 |
if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); |
210 |
unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); |
|
|
211 |
|
212 |
@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; |
209 |
@checkouts_previous = reverse(@checkouts_previous) |
213 |
@checkouts_previous = reverse(@checkouts_previous) |
210 |
if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); |
214 |
if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); |
211 |
|
215 |
|
212 |
my @checkouts = ( @checkouts_today, @checkouts_previous ); |
216 |
my @checkouts = ( @checkouts_today, @checkouts_previous ); |
213 |
|
217 |
|
|
|
218 |
my $i = 1; |
219 |
map { $_->{sort_order} = $i++ } @checkouts; |
220 |
|
221 |
|
214 |
my $data; |
222 |
my $data; |
215 |
$data->{'iTotalRecords'} = scalar @checkouts; |
223 |
$data->{'iTotalRecords'} = scalar @checkouts; |
216 |
$data->{'iTotalDisplayRecords'} = scalar @checkouts; |
224 |
$data->{'iTotalDisplayRecords'} = scalar @checkouts; |
217 |
- |
|
|