Bug 15774: Add additional fields to order baskets
[koha.git] / C4 / HoldsQueue.pm
index cf86aa8..1015763 100755 (executable)
@@ -29,6 +29,7 @@ use C4::Circulation;
 use C4::Members;
 use C4::Biblio;
 use Koha::DateUtils;
+use Koha::Items;
 use Koha::Patrons;
 
 use List::Util qw(shuffle);
@@ -146,7 +147,7 @@ sub GetHoldsQueueItems {
     $sth->execute(@bind_params);
     my $items = [];
     while ( my $row = $sth->fetchrow_hashref ){
-        my $record = GetMarcBiblio($row->{biblionumber});
+        my $record = GetMarcBiblio({ biblionumber => $row->{biblionumber} });
         if ($record){
             $row->{subtitle} = [ map { $_->{subfield} } @{ GetRecordValue( 'subtitle', $record, '' ) } ];
             $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield};
@@ -674,9 +675,9 @@ sub CreatePicklistFromItemMap {
         my $reservenotes = $mapped_item->{reservenotes};
         my $item_level = $mapped_item->{item_level};
 
-        my $item = GetItem($itemnumber);
-        my $barcode = $item->{barcode};
-        my $itemcallnumber = $item->{itemcallnumber};
+        my $item = Koha::Items->find($itemnumber);
+        my $barcode = $item->barcode;
+        my $itemcallnumber = $item->itemcallnumber;
 
         my $patron = Koha::Patrons->find( $borrowernumber );
         my $cardnumber = $patron->cardnumber;