followup to AddReturn patch - fix test
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 22 Jul 2009 14:06:06 +0000 (09:06 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 22 Jul 2009 14:15:32 +0000 (10:15 -0400)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Circulation.pm

index 86ba7f1..80263bc 100644 (file)
@@ -1422,11 +1422,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'};