View | Details | Raw Unified | Return to bug 23233
Collapse All | Expand All

(-)a/C4/Items.pm (-7 / +3 lines)
Lines 943-951 sub GetItemsInfo { Link Here
943
           holding.branchname,
943
           holding.branchname,
944
           holding.opac_info as holding_branch_opac_info,
944
           holding.opac_info as holding_branch_opac_info,
945
           home.opac_info as home_branch_opac_info
945
           home.opac_info as home_branch_opac_info
946
    ";
946
           IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold
947
    $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP');
948
    $query .= "
949
     FROM items
947
     FROM items
950
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
948
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
951
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
949
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 958-969 sub GetItemsInfo { Link Here
958
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
956
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
959
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
957
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
960
    $query .= "
958
    $query .= "
961
    LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP');
959
    LEFT JOIN tmp_holdsqueue USING (itemnumber)
962
    $query .= q|
963
    LEFT JOIN localization ON itemtypes.itemtype = localization.code
960
    LEFT JOIN localization ON itemtypes.itemtype = localization.code
964
        AND localization.entity = 'itemtypes'
961
        AND localization.entity = 'itemtypes'
965
        AND localization.lang = ?
962
        AND localization.lang = ?
966
    |;
963
    ";
967
964
968
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
965
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
969
    my $sth = $dbh->prepare($query);
966
    my $sth = $dbh->prepare($query);
970
- 

Return to bug 23233