[Patches] [PATCH] Bug 7271 - change sort in items.pm to sort by home library instead of holding branch
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Tue Nov 29 11:40:03 NZDT 2011
From: Liz Rea <wizzyrea at gmail.com>
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
More information about the Patches
mailing list