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

(-)a/C4/Biblio.pm (-3 / +4 lines)
Lines 893-902 sub GetBiblioFromItemNumber { Link Here
893
    my $sth;
893
    my $sth;
894
    if ($itemnumber) {
894
    if ($itemnumber) {
895
        $sth = $dbh->prepare(
895
        $sth = $dbh->prepare(
896
            "SELECT * FROM items 
896
            "SELECT items.*, biblio.*, biblioitems.*, itemtypes.notforloan as notforloan_per_itemtype FROM items
897
            LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber
897
            LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber
898
            LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
898
            LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
899
             WHERE items.itemnumber = ?"
899
            LEFT JOIN itemtypes ON itemtypes.itemtype = " .
900
            (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype') .
901
            " WHERE items.itemnumber = ?"
900
        );
902
        );
901
        $sth->execute($itemnumber);
903
        $sth->execute($itemnumber);
902
    } else {
904
    } else {
903
- 

Return to bug 12302