From 92a2d689cf62aa3488258b5b53e1acab8d25bd35 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Mon, 28 Nov 2011 11:39:33 -0600 Subject: [PATCH] Bug 7271 - change sort in items.pm to sort by home library instead of holding branch Content-Type: text/plain; charset="utf-8" --- C4/Items.pm | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0b91b65..da01a21 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1185,14 +1185,15 @@ sub GetItemsInfo { items.notforloan as itemnotforloan, itemtypes.description, itemtypes.notforloan as notforloan_per_itemtype, - branchurl + holding.branchurl FROM items - LEFT JOIN branches ON items.holdingbranch = branches.branchcode + LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode + LEFT JOIN branches AS home ON items.homebranch=home.branchcode LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN itemtypes ON itemtypes.itemtype = " . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); - $query .= " WHERE items.biblionumber = ? ORDER BY branches.branchname,items.dateaccessioned desc" ; + $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname,items.dateaccessioned desc" ; my $sth = $dbh->prepare($query); $sth->execute($biblionumber); my $i = 0; -- 1.7.2.5