While reviewing the main patch for this bug to verify that the
holds queue routines and C4::Reserves had the same conception of
when a damaged item could fill a hold request, I noticed that
GetItemsAvailableToFillHoldRequestsForBib() duplicated the code
for adding an SQL clause to filter out damaged items. This patch
removes the duplication and improves the POD for that routine.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
* it is not currently in transit
* it is not lost
* it is not sitting on the hold shelf
+ * it is not damaged (unless AllowHoldsOnDamagedItems is on)
=cut
AND (found IS NOT NULL OR priority = 0)
)
AND items.biblionumber = ?";
- $items_query .= " AND damaged = 0 "
- unless C4::Context->preference('AllowHoldsOnDamagedItems');
my @params = ($biblionumber, $biblionumber);
if ($branches_to_use && @$branches_to_use) {