From 076ca9324fb000b132216b07799e8b9f7e391342 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 Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain --- C4/Items.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 80255291a6..b257e52455 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; -- 2.39.5