Merge remote-tracking branch 'kc/new/enh/bug_5922' into kcmaster
[koha.git] / circ / returns.pl
index d7fad0c..6826d7c 100755 (executable)
@@ -277,6 +277,8 @@ if ($barcode) {
                 $template->param(
                     waiting_holds       => $waiting_holds,
                     holdsborrowernumber => $borrower->{'borrowernumber'},
+                    holdsfirstname => $borrower->{'firstname'},
+                    holdssurname => $borrower->{'surname'},
                 );
             }
         }
@@ -537,6 +539,7 @@ if ($borrower) {
 my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8;
 my $count = 0;
 my @riloop;
+my $shelflocations = GetKohaAuthorisedValues('items.location','');
 foreach ( sort { $a <=> $b } keys %returneditems ) {
     my %ri;
     if ( $count++ < $returned_counter ) {
@@ -575,6 +578,11 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
         $ri{ccode}            = $biblio->{'ccode'};
         $ri{itemnumber}       = $biblio->{'itemnumber'};
         $ri{barcode}          = $bar_code;
+
+        $ri{location}         = $biblio->{'location'};
+        my $shelfcode = $ri{'location'};
+        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
+
     }
     else {
         last;