Lines 326-338
sub GetItemsAvailableToFillHoldRequestsForBib {
Link Here
|
326 |
$items_query .= "JOIN biblioitems USING (biblioitemnumber) |
326 |
$items_query .= "JOIN biblioitems USING (biblioitemnumber) |
327 |
LEFT JOIN itemtypes USING (itemtype) "; |
327 |
LEFT JOIN itemtypes USING (itemtype) "; |
328 |
} |
328 |
} |
329 |
$items_query .= " LEFT JOIN branchtransfers ON (items.itemnumber = branchtransfers.itemnumber)"; |
329 |
$items_query .= " LEFT JOIN branchtransfers ON ( |
|
|
330 |
items.itemnumber = branchtransfers.itemnumber |
331 |
AND branchtransfers.datearrived IS NULL AND branchtransfers.datecancelled IS NULL |
332 |
)"; |
330 |
$items_query .= " WHERE items.notforloan = 0 |
333 |
$items_query .= " WHERE items.notforloan = 0 |
331 |
AND holdingbranch IS NOT NULL |
334 |
AND holdingbranch IS NOT NULL |
332 |
AND itemlost = 0 |
335 |
AND itemlost = 0 |
333 |
AND withdrawn = 0"; |
336 |
AND withdrawn = 0"; |
334 |
$items_query .= " AND branchtransfers.datearrived IS NULL |
|
|
335 |
AND branchtransfers.datecancelled IS NULL"; |
336 |
$items_query .= " AND damaged = 0" unless C4::Context->preference('AllowHoldsOnDamagedItems'); |
337 |
$items_query .= " AND damaged = 0" unless C4::Context->preference('AllowHoldsOnDamagedItems'); |
337 |
$items_query .= " AND items.onloan IS NULL |
338 |
$items_query .= " AND items.onloan IS NULL |
338 |
AND (itemtypes.notforloan IS NULL OR itemtypes.notforloan = 0) |
339 |
AND (itemtypes.notforloan IS NULL OR itemtypes.notforloan = 0) |
Lines 343-349
sub GetItemsAvailableToFillHoldRequestsForBib {
Link Here
|
343 |
AND itemnumber IS NOT NULL |
344 |
AND itemnumber IS NOT NULL |
344 |
AND (found IS NOT NULL OR priority = 0) |
345 |
AND (found IS NOT NULL OR priority = 0) |
345 |
) |
346 |
) |
346 |
AND items.biblionumber = ?"; |
347 |
AND items.biblionumber = ? |
|
|
348 |
AND branchtransfers.itemnumber IS NULL"; |
347 |
|
349 |
|
348 |
my @params = ($biblionumber, $biblionumber); |
350 |
my @params = ($biblionumber, $biblionumber); |
349 |
if ($branches_to_use && @$branches_to_use) { |
351 |
if ($branches_to_use && @$branches_to_use) { |
350 |
- |
|
|