@@ -315,7 +317,7 @@
[% IF ( itemsloo.notforloan ) %]
No holds allowed
[% ELSE %]
- [% IF ( itemsloo.ITEM_RESULTS.size ) %]
+ [% IF ( itemsloo.ITEM_RESULTS.count ) %]
Holds
[% IF ( holdfor ) %] | Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %][% END %]
[% ELSE %]
@@ -334,12 +336,16 @@
[% itemsloo.dateadded | $KohaDates%] |
- [% FOREACH result IN itemsloo.ITEM_RESULTS %]
+ [% FOREACH item IN itemsloo.ITEM_RESULTS %]
-
- [% result.holdingbranch | html %]
- [% IF ( result.location_intranet ) %][% result.location_intranet | html %][% END %]
- [% IF ( result.itemcallnumber ) %]
- [[% result.itemcallnumber | html %]]
+ [% Branches.GetName(item.holdingbranch) | html %]
+ [% IF ( item.location ) %]
+
+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
+
+ [% END %]
+ [% IF ( item.itemcallnumber ) %]
+ [[% item.itemcallnumber | html %]]
[% END %]
[% END %]
diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl
index e87092884c..0dd51b78ea 100755
--- a/virtualshelves/sendshelf.pl
+++ b/virtualshelves/sendshelf.pl
@@ -29,7 +29,6 @@ use C4::Biblio qw(
GetMarcISBN
GetMarcSubjects
);
-use C4::Items qw( GetItemsInfo );
use C4::Output qw(
output_html_with_http_headers
output_and_exit
@@ -83,13 +82,13 @@ if ($to_address) {
my $marcauthorsarray = $biblio->get_marc_contributors;
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = GetItemsInfo($biblionumber);
+ my $items = $biblio->items->search_ordered;
$dat->{ISBN} = GetMarcISBN($record, $marcflavour);
$dat->{MARCSUBJCTS} = $marcsubjctsarray;
$dat->{MARCAUTHORS} = $marcauthorsarray;
$dat->{'biblionumber'} = $biblionumber;
- $dat->{ITEM_RESULTS} = \@items;
+ $dat->{ITEM_RESULTS} = $items;
$dat->{HASAUTHORS} = $dat->{'author'} || @$marcauthorsarray;
$iso2709 .= $record->as_usmarc();
diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl
index eb5e77461f..fa92cfcd6e 100755
--- a/virtualshelves/shelves.pl
+++ b/virtualshelves/shelves.pl
@@ -28,7 +28,6 @@ use C4::Koha qw(
GetNormalizedOCLCNumber
GetNormalizedUPC
);
-use C4::Items qw( GetItemsLocationInfo );
use C4::Members;
use C4::Output qw( pagination_bar output_html_with_http_headers );
use C4::XSLT qw( XSLTParse4Display );
@@ -323,8 +322,8 @@ if ( $op eq 'view' ) {
}
# Getting items infos for location display
- my @items_infos = &GetItemsLocationInfo( $biblionumber );
- $this_item->{'ITEM_RESULTS'} = \@items_infos;
+ my $items = $biblio->items;
+ $this_item->{'ITEM_RESULTS'} = $items;
$this_item->{biblionumber} = $biblionumber;
push @items, $this_item;
}
--
2.39.2
|