followup to AddReturn patch - fix test
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 22 Jul 2009 14:06:06 +0000 (09:06 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:42 +0000 (23:19 +0200)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Circulation.pm

index f27ea3e..f489fa8 100644 (file)
@@ -1335,11 +1335,12 @@ sub AddReturn {
         $messages->{'BadBarcode'} = $barcode;
         $doreturn = 0;
     } else {
-        if ( not $iteminformation ) {
+        if ( not %$iteminformation ) {
             $messages->{'NotIssued'} = $barcode;
             # even though item is not on loan, it may still
             # be transferred; therefore, get current branch information
-            my $curr_iteminfo = GetItem($iteminformation->{'itemnumber'});
+            my $curr_iteminfo = GetItem($itemnumber);
+            $iteminformation->{'itemnumber'}    = $curr_iteminfo->{'itemnumber'};
             $iteminformation->{'homebranch'}    = $curr_iteminfo->{'homebranch'};
             $iteminformation->{'holdingbranch'} = $curr_iteminfo->{'holdingbranch'};
             $iteminformation->{'itemlost'}      = $curr_iteminfo->{'itemlost'};