Lines 215-221
my $strsth =
Link Here
|
215 |
count(DISTINCT items.itemnumber) as icount, |
215 |
count(DISTINCT items.itemnumber) as icount, |
216 |
count(DISTINCT reserves.borrowernumber) as rcount, |
216 |
count(DISTINCT reserves.borrowernumber) as rcount, |
217 |
borrowers.firstname, |
217 |
borrowers.firstname, |
218 |
borrowers.surname |
218 |
borrowers.surname, |
|
|
219 |
borrowers.branchcode as bbranch |
219 |
FROM reserves |
220 |
FROM reserves |
220 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
221 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
221 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
222 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
Lines 249-254
$strsth .= " GROUP BY reserves.biblionumber ORDER BY biblio.title ";
Link Here
|
249 |
my $sth = $dbh->prepare($strsth); |
250 |
my $sth = $dbh->prepare($strsth); |
250 |
$sth->execute(@query_params); |
251 |
$sth->execute(@query_params); |
251 |
|
252 |
|
|
|
253 |
my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' }); |
254 |
my $cancel_notice_exists; |
255 |
while ( my $notice = $cancel_notify_templates->next ) { |
256 |
$cancel_notice_exists->{$notice->branchcode} = 1; |
257 |
} |
258 |
|
252 |
while ( my $data = $sth->fetchrow_hashref ) { |
259 |
while ( my $data = $sth->fetchrow_hashref ) { |
253 |
push( |
260 |
push( |
254 |
@reservedata, { |
261 |
@reservedata, { |
Lines 280-285
while ( my $data = $sth->fetchrow_hashref ) {
Link Here
|
280 |
homebranch => $data->{homebranch}, |
287 |
homebranch => $data->{homebranch}, |
281 |
itemnumber => $data->{itemnumber}, |
288 |
itemnumber => $data->{itemnumber}, |
282 |
publicationyear => C4::Context->preference('marcflavour') eq "MARC21" ? $data->{copyrightdate} : $data->{publicationyear}, |
289 |
publicationyear => C4::Context->preference('marcflavour') eq "MARC21" ? $data->{copyrightdate} : $data->{publicationyear}, |
|
|
290 |
cancel_notify => exists($cancel_notice_exists->{$data->{bbranch}}) ? 1 : exists($cancel_notice_exists->{''}), |
283 |
} |
291 |
} |
284 |
); |
292 |
); |
285 |
} |
293 |
} |