-
columnname: title
-
+ columnname: record_type
+ -
columnname: item_type
-
columnname: collection
-
columnname: title
-
+ columnname: record_type
+ -
columnname: item_type
-
columnname: collection
columnname: dateaccessioned
is_hidden: 1
-
+ columnname: record_type
+ -
columnname: itype
-
columnname: borrower
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;
$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;
<tfoot>
<tr>
- <td colspan="13" style="text-align: right; font-weight:bold;">Totals:</td>
+ <td colspan="14" 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>
<th scope="col">Due date</th>
<th scope="col">Due date</th>
<th scope="col">Title</th>
+ <th scope="col">Record-level item type</th>
<th scope="col">Item type</th>
<th scope="col">Collection</th>
<th scope="col">Location</th>
<th scope="col">Due date (unformatted, hidden)</th>
<th scope="col">Due date</th>
<th scope="col">Title</th>
+ <th scope="col">Record-level item type</th>
<th scope="col">Item type</th>
<th scope="col">Collection code</th>
<th scope="col">Location</th>
<th class="ci-shelvinglocation">Shelving location</th>
<th class="ci-callnumber">Call number</th>
<th class="ci-dateaccessioned">Date acquired</th>
- <th class="ci-type">Type</th>
+ <th class="ci-recordlevelitemtype">Record-level itemtype</th>
+ <th class="ci-itemtype">Item type</th>
<th class="ci-patron">Patron</th>
<th class="ci-note">Note</th>
</tr>
<td class="ci-dateaccessioned">
[% riloo.dateaccessioned | $KohaDates %]
</td>
- <td class="ci-type">
+ <td class="ci-recordlevelitemtype">
+ [% ItemTypes.GetDescription( riloo.recordtype ) | html %]
+ </td>
+ <td class="ci-itemtype">
[% ItemTypes.GetDescription( riloo.itemtype ) | html %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) | html %]
</td>
<td class="ci-patron">
},
{
"mDataProp": function ( oObj ) {
+ return oObj.recordtype_description.escapeHtml();
+ }
+ },
+ {
+ "mDataProp": function ( oObj ) {
return oObj.itemtype_description.escapeHtml();
}
},
// 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 = $('<ul>');
},
{
"mDataProp": function ( oObj ) {
+ return oObj.recordtype_description.escapeHtml();
+ }
+ },
+ {
+ "mDataProp": function ( oObj ) {
return oObj.itemtype_description.escapeHtml();
}
},
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} });
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},