Bugzilla – Attachment 110745 Details for
Bug 19351
Add copynumber in the checkouts table in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19351: Add items.copynumber to the checkouts table
Bug-19351-Add-itemscopynumber-to-the-checkouts-tab.patch (text/plain), 5.32 KB, created by
David Nind
on 2020-09-25 10:40:04 UTC
(
hide
)
Description:
Bug 19351: Add items.copynumber to the checkouts table
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-09-25 10:40:04 UTC
Size:
5.32 KB
patch
obsolete
>From 6cec1f1a4915d4a4c0534049a37c0a536ed33781 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >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 <david@davidnind.com> >--- > 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/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 96b3a31a68..dbe856b5f5 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -786,6 +786,8 @@ modules: > - > columnname: callno > - >+ columnname: copynumber >+ - > columnname: charge > - > columnname: fine >@@ -1049,6 +1051,8 @@ modules: > - > columnname: callno > - >+ columnname: copynumber >+ - > columnname: charge > - > columnname: fine >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 @@ > <tfoot> > <tr> >- <td colspan="14" style="text-align: right; font-weight:bold;">Totals:</td> >+ <td colspan="15" style="text-align: right; font-weight:bold;">Totals:</td> > <td id="totaldue" style="text-align: right;"></td> > <td id="totalfine" style="text-align: right;"></td> > <td id="totalprice" style="text-align: right;"></td> >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 @@ > <th scope="col">Checked out on</th> > <th scope="col">Checked out from</th> > <th scope="col">Call no</th> >+ <th scope="col">Copy no</th> > <th scope="col">Charge</th> > <th scope="col">Fine</th> > <th scope="col">Price</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 03c0e6242f..ee543b4eac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -392,6 +392,11 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >+ return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' ); >+ } >+ }, >+ { >+ "mDataProp": function ( oObj ) { > if ( ! oObj.charge ) oObj.charge = 0; > return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).toFixed(2) + '<span>'; > } >@@ -761,6 +766,11 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >+ return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' ); >+ } >+ }, >+ { >+ "mDataProp": function ( oObj ) { > if ( ! oObj.charge ) oObj.charge = 0; > return parseFloat(oObj.charge).toFixed(2); > } >diff --git a/svc/checkouts b/svc/checkouts >index fa470b3a2a..27787c6219 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, >@@ -206,7 +207,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.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19351
:
110713
|
110745
|
111733