From 9815d7945aa05862e2ab5ec4ce2e8f6c7cf0d6a3 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 25 Sep 2020 00:24:29 +0200 Subject: [PATCH] Bug 19351: Add items.copynumber to the checkouts table This adds the items.copynumber to the checkouts table in the patron account in the staff interface. To test: - Apply patch - Check out some items with and without copy number in the item to any patron - In the checkouts table on the Checkouts and Details tabs: - Verify that a new column shows 'copy no' shows after 'call no' - Verify the information displays correctly - Verify that the column configuration settings for the new column works Signed-off-by: David Nind Signed-off-by: Kyle M Hall --- admin/columns_settings.yml | 4 ++++ .../prog/en/includes/checkouts-table-footer.inc | 2 +- .../intranet-tmpl/prog/en/includes/checkouts-table.inc | 1 + koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 10 ++++++++++ svc/checkouts | 4 +++- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 3d7a426059..15d10a204c 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -797,6 +797,8 @@ modules: columnname: checkout_from - columnname: callno + - + columnname: copynumber - columnname: charge - @@ -1060,6 +1062,8 @@ modules: columnname: checkout_from - columnname: callno + - + columnname: copynumber - columnname: charge - 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 9b62491d4a..321f5eea04 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: 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 1efa03b568..ff073e522e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -24,6 +24,7 @@ Checked out on Checked out from Call no + Copy no Charge Fine Price diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 1b576b5b37..b4077ce9ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -399,6 +399,11 @@ $(document).ready(function() { return ( oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '' ); } }, + { + "mDataProp": function ( oObj ) { + return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' ); + } + }, { "mDataProp": function ( oObj ) { if ( ! oObj.charge ) oObj.charge = 0; @@ -770,6 +775,11 @@ $(document).ready(function() { return ( oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '' ); } }, + { + "mDataProp": function ( oObj ) { + return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' ); + } + }, { "mDataProp": function ( oObj ) { if ( ! oObj.charge ) oObj.charge = 0; diff --git a/svc/checkouts b/svc/checkouts index 2dce8f3daf..611b28d2af 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -85,6 +85,7 @@ my $sql = ' items.itemnotes, items.itemnotes_nonpublic, items.itemcallnumber, + items.copynumber, items.replacementprice, issues.branchcode, @@ -221,7 +222,8 @@ while ( my $c = $sth->fetchrow_hashref() ) { itemnotes_nonpublic => $c->{itemnotes_nonpublic}, branchcode => $c->{branchcode}, branchname => $c->{branchname}, - itemcallnumber => $c->{itemcallnumber} || q{}, + itemcallnumber => $c->{itemcallnumber} || q{}, + copynumber => $c->{copynumber} || q{}, charge => $charge, fine => $fine, price => $c->{replacementprice} || q{}, -- 2.24.1 (Apple Git-126)