itemlost,
damaged,
+ location,
DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today
FROM issues
barcode => $c->{barcode},
itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype},
itemtype_description => $item_level_itypes ? $c->{itype_description} : $c->{itemtype_description},
+ location => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{},
itemnotes => $c->{itemnotes},
branchcode => $c->{branchcode},
branchname => $c->{branchname},
}
}
+
+@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today;
@checkouts_today = reverse(@checkouts_today)
- if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
+ unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
+
+@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous;
@checkouts_previous = reverse(@checkouts_previous)
if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
my @checkouts = ( @checkouts_today, @checkouts_previous );
+my $i = 1;
+map { $_->{sort_order} = $i++ } @checkouts;
+
+
my $data;
$data->{'iTotalRecords'} = scalar @checkouts;
$data->{'iTotalDisplayRecords'} = scalar @checkouts;