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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Katrin Fischer 2020-09-25 00:24:29 +02:00 committed by Jonathan Druart
parent 973e1b1d5d
commit a8e5d9ab9f
5 changed files with 19 additions and 2 deletions

View file

@ -801,6 +801,8 @@ modules:
columnname: checkout_from
-
columnname: callno
-
columnname: copynumber
-
columnname: charge
-
@ -1064,6 +1066,8 @@ modules:
columnname: checkout_from
-
columnname: callno
-
columnname: copynumber
-
columnname: charge
-

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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{},