fix initiation of transfer on return of non-issued item
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 14 Mar 2008 21:39:46 +0000 (16:39 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 15 Mar 2008 13:37:20 +0000 (08:37 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Circulation.pm

index 11e3210..1cd8202 100644 (file)
@@ -1165,6 +1165,11 @@ sub AddReturn {
         # find the borrower
         if ( ( not $iteminformation->{borrowernumber} ) && $doreturn ) {
             $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'});
+            $iteminformation->{'homebranch'} = $curr_iteminfo->{'homebranch'};
+            $iteminformation->{'holdingbranch'} = $curr_iteminfo->{'holdingbranch'};
             $doreturn = 0;
         }