@@ -, +, @@
in circulation screens
mapped to a MARC field. Otherwise create those mappings.
---
admin/columns_settings.yml | 6 ++++++
circ/returns.pl | 4 +++-
.../prog/en/includes/checkouts-table-footer.inc | 2 +-
.../prog/en/includes/checkouts-table.inc | 1 +
.../prog/en/includes/relatives-issues-table.inc | 1 +
.../intranet-tmpl/prog/en/modules/circ/returns.tt | 8 ++++++--
koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 12 +++++++++++-
svc/checkouts | 7 +++++--
8 files changed, 34 insertions(+), 7 deletions(-)
--- a/admin/columns_settings.yml
+++ a/admin/columns_settings.yml
@@ -582,6 +582,8 @@ modules:
columnname: due_date
-
columnname: title
+ -
+ columnname: record_type
-
columnname: item_type
-
@@ -795,6 +797,8 @@ modules:
columnname: due_date
-
columnname: title
+ -
+ columnname: record_type
-
columnname: item_type
-
@@ -869,6 +873,8 @@ modules:
-
columnname: dateaccessioned
is_hidden: 1
+ -
+ columnname: record_type
-
columnname: itype
-
--- a/circ/returns.pl
+++ a/circ/returns.pl
@@ -589,6 +589,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
my $item = Koha::Items->find({ barcode => $bar_code });
next unless $item; # FIXME The item has been deleted in the meantime,
# we could handle that better displaying a message in the template
+
my $biblio = $item->biblio;
# FIXME pass $item to the template and we are done here...
$ri{itembiblionumber} = $biblio->biblionumber;
@@ -599,7 +600,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
$ri{itemauthor} = $biblio->author;
$ri{itemcallnumber} = $item->itemcallnumber;
$ri{dateaccessioned} = $item->dateaccessioned;
- $ri{itemtype} = $item->effective_itemtype;
+ $ri{recordtype} = $biblio->itemtype;
+ $ri{itemtype} = $item->itype;
$ri{itemnote} = $item->itemnotes;
$ri{itemnotes_nonpublic} = $item->itemnotes_nonpublic;
$ri{ccode} = $item->ccode;
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc
@@ -1,6 +1,6 @@
- Totals: |
+ Totals: |
|
|
|
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
@@ -15,6 +15,7 @@
Due date |
Due date |
Title |
+ Record-level item type |
Item type |
Collection |
Location |
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc
@@ -7,6 +7,7 @@
Due date (unformatted, hidden) |
Due date |
Title |
+ Record-level item type |
Item type |
Collection code |
Location |
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
@@ -794,7 +794,8 @@
Shelving location |
Call number |
Date acquired |
- Type |
+ Record-level itemtype |
+ Item type |
Patron |
Note |
@@ -844,7 +845,10 @@
[% riloo.dateaccessioned | $KohaDates %]
|
-
+ |
+ [% ItemTypes.GetDescription( riloo.recordtype ) | html %]
+ |
+
[% ItemTypes.GetDescription( riloo.itemtype ) | html %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) | html %]
|
--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
@@ -346,6 +346,11 @@ $(document).ready(function() {
},
"sType": "anti-the"
},
+ {
+ "mDataProp": function ( oObj ) {
+ return oObj.recordtype_description.escapeHtml();
+ }
+ },
{
"mDataProp": function ( oObj ) {
return oObj.itemtype_description.escapeHtml();
@@ -607,7 +612,7 @@ $(document).ready(function() {
// Build a summary of checkouts grouped by itemtype
var checkoutsByItype = json.aaData.reduce(function (obj, row) {
- obj[row.itemtype_description] = (obj[row.itemtype_description] || 0) + 1;
+ obj[row.type_for_stat] = (obj[row.type_for_stat] || 0) + 1;
return obj;
}, {});
var ul = $('');
@@ -724,6 +729,11 @@ $(document).ready(function() {
},
"sType": "anti-the"
},
+ {
+ "mDataProp": function ( oObj ) {
+ return oObj.recordtype_description.escapeHtml();
+ }
+ },
{
"mDataProp": function ( oObj ) {
return oObj.itemtype_description.escapeHtml();
--- a/svc/checkouts
+++ a/svc/checkouts
@@ -161,7 +161,9 @@ while ( my $c = $sth->fetchrow_hashref() ) {
my ( $renewals_count, $renewals_allowed, $renewals_remaining ) =
GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} );
- my $itemtype = Koha::ItemTypes->find( $item_level_itypes ? $c->{itype} : $c->{itemtype} );
+ my $type_for_stat = Koha::ItemTypes->find( $item_level_itypes ? $c->{itype} : $c->{itemtype} );
+ my $itemtype = Koha::ItemTypes->find( $c->{itype} );
+ my $recordtype = Koha::ItemTypes->find( $c->{itemtype} );
my $location;
if ( $c->{location} ) {
my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $c->{location} });
@@ -194,8 +196,9 @@ while ( my $c = $sth->fetchrow_hashref() ) {
part_name => $c->{part_name} // '',
author => $c->{author},
barcode => $c->{barcode},
- itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype},
+ type_for_stat => $type_for_stat ? $type_for_stat->translated_description : q{},
itemtype_description => $itemtype ? $itemtype->translated_description : q{},
+ recordtype_description => $recordtype ? $recordtype->translated_description : q{},
collection => $collection,
location => $location,
homebranch => $c->{homebranch},
--
|