Lines 89-94
if ($enddate_iso) {
Link Here
|
89 |
push @query_params, $enddate_iso; |
89 |
push @query_params, $enddate_iso; |
90 |
} |
90 |
} |
91 |
|
91 |
|
|
|
92 |
my $item_type = C4::Context->preference('item-level_itypes') ? "items.itype" : "biblioitems.itemtype"; |
93 |
|
92 |
my $strsth = |
94 |
my $strsth = |
93 |
"SELECT min(reservedate) as l_reservedate, |
95 |
"SELECT min(reservedate) as l_reservedate, |
94 |
reserves.borrowernumber as borrowernumber, |
96 |
reserves.borrowernumber as borrowernumber, |
Lines 96-103
my $strsth =
Link Here
|
96 |
ORDER BY items.itemnumber SEPARATOR '|') l_holdingbranch, |
98 |
ORDER BY items.itemnumber SEPARATOR '|') l_holdingbranch, |
97 |
reserves.biblionumber, |
99 |
reserves.biblionumber, |
98 |
reserves.branchcode as l_branch, |
100 |
reserves.branchcode as l_branch, |
99 |
GROUP_CONCAT(DISTINCT items.itype |
101 |
GROUP_CONCAT(DISTINCT $item_type |
100 |
ORDER BY items.itemnumber SEPARATOR '|') l_itype, |
102 |
ORDER BY items.itemnumber SEPARATOR '|') l_item_type, |
101 |
GROUP_CONCAT(DISTINCT items.location |
103 |
GROUP_CONCAT(DISTINCT items.location |
102 |
ORDER BY items.itemnumber SEPARATOR '|') l_location, |
104 |
ORDER BY items.itemnumber SEPARATOR '|') l_location, |
103 |
GROUP_CONCAT(DISTINCT items.itemcallnumber |
105 |
GROUP_CONCAT(DISTINCT items.itemcallnumber |
Lines 115-120
my $strsth =
Link Here
|
115 |
FROM reserves |
117 |
FROM reserves |
116 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
118 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
117 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
119 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
|
|
120 |
LEFT JOIN biblioitems ON biblio.biblionumber=biblioitems.biblionumber |
118 |
LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber |
121 |
LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber |
119 |
LEFT JOIN issues ON items.itemnumber=issues.itemnumber |
122 |
LEFT JOIN issues ON items.itemnumber=issues.itemnumber |
120 |
LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber |
123 |
LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber |
Lines 165-171
while ( my $data = $sth->fetchrow_hashref ) {
Link Here
|
165 |
count => $data->{icount}, |
168 |
count => $data->{icount}, |
166 |
rcount => $data->{rcount}, |
169 |
rcount => $data->{rcount}, |
167 |
pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, |
170 |
pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, |
168 |
itypes => [split('\|', $data->{l_itype})], |
171 |
itemTypes => [split('\|', $data->{l_item_type})], |
169 |
locations => [split('\|', $data->{l_location})], |
172 |
locations => [split('\|', $data->{l_location})], |
170 |
} |
173 |
} |
171 |
); |
174 |
); |