From d7cfdb45e5c90e9816d31e55723f59b278c80966 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 Dec 2014 11:59:07 +0100 Subject: [PATCH] Bug 13492: Add the location column to the checkouts tables Test plan: 1/ Verify that the location column is correctly displayed on the checkouts tables (circ/circulation.pl and members/moremember.pl). 2/ Verify that you can hide/show this column (using the admin page and/or the ColVis DT plugin). Signed-off-by: Aleisha Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- admin/columns_settings.yml | 4 ++++ .../intranet-tmpl/prog/en/includes/checkouts-table-footer.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc | 1 + koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 2 ++ svc/checkouts | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index fc972ebc38..b8c6bfc1d6 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -134,6 +134,8 @@ modules: columnname: title - columnname: item_type + - + columnname: location - columnname: checkout_on - @@ -213,6 +215,8 @@ modules: columnname: title - columnname: item_type + - + columnname: location - columnname: checkout_on - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc index 549030ff9d..0de211f8cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc @@ -1,6 +1,6 @@ - Totals: + Totals: [% totaldue %] [% finetotal %] [% totalprice %] 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 dcc0079267..7c2e7a98ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -15,6 +15,7 @@ Due date Title Item type + Location Checked out on Checked out from Call no diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js index b626ece083..7607aae42f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js @@ -259,6 +259,7 @@ $(document).ready(function() { "sType": "anti-the" }, { "mDataProp": "itemtype_description" }, + { "mDataProp": "location" }, { "mDataProp": "issuedate_formatted" }, { "mDataProp": "branchname" }, { "mDataProp": "itemcallnumber" }, @@ -503,6 +504,7 @@ $(document).ready(function() { "sType": "anti-the" }, { "mDataProp": "itemtype" }, + { "mDataProp": "location" }, { "mDataProp": "issuedate_formatted" }, { "mDataProp": "branchname" }, { "mDataProp": "itemcallnumber" }, diff --git a/svc/checkouts b/svc/checkouts index af373aa14d..d2eb8eec38 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -94,6 +94,7 @@ my $sql = ' itemlost, damaged, + location, DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today FROM issues @@ -151,6 +152,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { barcode => $c->{barcode}, itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, itemtype_description => $item_level_itypes ? $c->{itype_description} : $c->{itemtype_description}, + location => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{}, itemnotes => $c->{itemnotes}, branchcode => $c->{branchcode}, branchname => $c->{branchname}, -- 2.39.5