From 5937c09d1ae5f822af724cb1f1b1013099f87859 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 1 Jul 2019 08:44:53 -0400 Subject: [PATCH] Bug 23233: Remove use of AllowItemsOnHoldCheckout from C4::Items::GetItemsInfo --- C4/Items.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0e17fd90fe..3eabf5c19d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -943,9 +943,7 @@ sub GetItemsInfo { holding.branchname, holding.opac_info as holding_branch_opac_info, home.opac_info as home_branch_opac_info - "; - $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP'); - $query .= " + IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold FROM items LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode LEFT JOIN branches AS home ON items.homebranch=home.branchcode @@ -958,12 +956,11 @@ sub GetItemsInfo { LEFT JOIN itemtypes ON itemtypes.itemtype = " . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); $query .= " - LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP'); - $query .= q| + LEFT JOIN tmp_holdsqueue USING (itemnumber) LEFT JOIN localization ON itemtypes.itemtype = localization.code AND localization.entity = 'itemtypes' AND localization.lang = ? - |; + "; $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ; my $sth = $dbh->prepare($query); -- 2.20.1 (Apple Git-117)