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 4 years 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: checkout_from
- -
columnname: callno columnname: callno
-
columnname: copynumber
- -
columnname: charge columnname: charge
- -
@ -1064,6 +1066,8 @@ modules:
columnname: checkout_from columnname: checkout_from
- -
columnname: callno columnname: callno
-
columnname: copynumber
- -
columnname: charge columnname: charge
- -

2
koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc

@ -1,6 +1,6 @@
<tfoot> <tfoot>
<tr> <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="totaldue" style="text-align: right;"></td>
<td id="totalfine" style="text-align: right;"></td> <td id="totalfine" style="text-align: right;"></td>
<td id="totalprice" 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 on</th>
<th scope="col">Checked out from</th> <th scope="col">Checked out from</th>
<th scope="col">Call no</th> <th scope="col">Call no</th>
<th scope="col">Copy no</th>
<th scope="col">Charge</th> <th scope="col">Charge</th>
<th scope="col">Fine</th> <th scope="col">Fine</th>
<th scope="col">Price</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() : '' ); return ( oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '' );
} }
}, },
{
"mDataProp": function ( oObj ) {
return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' );
}
},
{ {
"mDataProp": function ( oObj ) { "mDataProp": function ( oObj ) {
if ( ! oObj.charge ) oObj.charge = 0; if ( ! oObj.charge ) oObj.charge = 0;
@ -770,6 +775,11 @@ $(document).ready(function() {
return ( oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '' ); return ( oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '' );
} }
}, },
{
"mDataProp": function ( oObj ) {
return ( oObj.copynumber ? oObj.copynumber.escapeHtml() : '' );
}
},
{ {
"mDataProp": function ( oObj ) { "mDataProp": function ( oObj ) {
if ( ! oObj.charge ) oObj.charge = 0; if ( ! oObj.charge ) oObj.charge = 0;

4
svc/checkouts

@ -85,6 +85,7 @@ my $sql = '
items.itemnotes, items.itemnotes,
items.itemnotes_nonpublic, items.itemnotes_nonpublic,
items.itemcallnumber, items.itemcallnumber,
items.copynumber,
items.replacementprice, items.replacementprice,
issues.branchcode, issues.branchcode,
@ -221,7 +222,8 @@ while ( my $c = $sth->fetchrow_hashref() ) {
itemnotes_nonpublic => $c->{itemnotes_nonpublic}, itemnotes_nonpublic => $c->{itemnotes_nonpublic},
branchcode => $c->{branchcode}, branchcode => $c->{branchcode},
branchname => $c->{branchname}, branchname => $c->{branchname},
itemcallnumber => $c->{itemcallnumber} || q{}, itemcallnumber => $c->{itemcallnumber} || q{},
copynumber => $c->{copynumber} || q{},
charge => $charge, charge => $charge,
fine => $fine, fine => $fine,
price => $c->{replacementprice} || q{}, price => $c->{replacementprice} || q{},

Loading…
Cancel
Save