Bug 10403: (follow-up) fix test to use vendor created earlier during test
[koha.git] / reserve / placerequest.pl
index 19d76be..3fe459c 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Auth qw/checkauth/;
 
 my $input = CGI->new();
 
-my ($user, $cookie, $sesion_id, $flags) = checkauth($input, 0, { reserveforothers => 'place_holds' }, 'intranet');
+checkauth($input, 0, { reserveforothers => 'place_holds' }, 'intranet');
 
 my @bibitems=$input->param('biblioitem');
 # FIXME I think reqbib does not exist anymore, it's used in line 82, to AddReserve of contraint type 'o'
@@ -98,6 +98,15 @@ if ($type eq 'str8' && $borrower){
         }
         my $const;
 
+       if ($checkitem ne ''){
+               my $item = GetItem($checkitem);
+               if ($item->{'biblionumber'} ne $biblionumber) {
+                       $biblionumber = $item->{'biblionumber'};
+               }
+       }
+
+
+
         if ($multi_hold) {
             my $bibinfo = $bibinfos{$biblionumber};
             AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',[$biblionumber],