Browse Source

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>
20.11.x
Katrin Fischer 1 year ago
committed by Jonathan Druart
parent
commit
a8e5d9ab9f
  1. 4
      admin/columns_settings.yml
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc
  3. 1
      koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
  4. 10
      koha-tmpl/intranet-tmpl/prog/js/checkouts.js
  5. 4
      svc/checkouts

4
admin/columns_settings.yml

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

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

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

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

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

Loading…
Cancel
Save