diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml
index e2c311322d..7ef4d35521 100644
--- a/admin/columns_settings.yml
+++ b/admin/columns_settings.yml
@@ -209,6 +209,8 @@ modules:
columnname: item_type
-
columnname: location
+ -
+ columnname: homebranch
-
columnname: checkout_on
-
@@ -292,6 +294,8 @@ modules:
columnname: item_type
-
columnname: location
+ -
+ columnname: homebranch
-
columnname: checkout_on
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
index 53ef182b45..78d3989f37 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
@@ -17,6 +17,7 @@
Title |
Item type |
Location |
+ Home library |
Checked out on |
Checked out from |
Call no |
diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
index f282aaba73..6d03a06ba8 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
@@ -276,6 +276,7 @@ $(document).ready(function() {
},
{ "mDataProp": "itemtype_description" },
{ "mDataProp": "location" },
+ { "mDataProp": "homebranch" },
{ "mDataProp": "issuedate_formatted" },
{ "mDataProp": "branchname" },
{ "mDataProp": "itemcallnumber" },
diff --git a/svc/checkouts b/svc/checkouts
index f1e3ffa1c3..119053c2f4 100755
--- a/svc/checkouts
+++ b/svc/checkouts
@@ -78,13 +78,14 @@ my $sql = '
itemnumber,
barcode,
+ branches2.branchname AS homebranch,
itemnotes,
itemnotes_nonpublic,
itemcallnumber,
replacementprice,
issues.branchcode,
- branchname,
+ branches.branchname,
items.itype,
biblioitems.itemtype,
@@ -106,6 +107,7 @@ my $sql = '
LEFT JOIN biblioitems USING ( biblionumber )
LEFT JOIN borrowers USING ( borrowernumber )
LEFT JOIN branches ON ( issues.branchcode = branches.branchcode )
+ LEFT JOIN branches branches2 ON ( items.homebranch = branches2.branchcode )
WHERE borrowernumber
';
@@ -155,6 +157,7 @@ while ( my $c = $sth->fetchrow_hashref() ) {
itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype},
itemtype_description => $itemtype->{translated_description},
location => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{},
+ homebranch => $c->{homebranch},
itemnotes => $c->{itemnotes},
itemnotes_nonpublic => $c->{itemnotes_nonpublic},
branchcode => $c->{branchcode},