[Koha-patches] [PATCH 6/6] implement bailing out of AddReturn if IndependantBranches is on

Galen Charlton gmcharlt at gmail.com
Sun Aug 23 16:04:24 CEST 2009


If IndependantBranches is ON and user attempts to return an
item at a library other than the item's home library, bail out.
This action, which was previously just a suggestion in the code,
is now required to ensure that the item doesn't get its
holdingbranch set to the library at which the attempt to return
the item was made.

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 C4/Circulation.pm |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index b1fe99a..b1a6e26 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1448,7 +1448,13 @@ sub AddReturn {
             Wrongbranch => $branch,
             Rightbranch => $hbr,
         };
-        $doreturn = 0;  # Could we bail here?
+        $doreturn = 0;
+        # bailing out here - in this case, current desired behavior
+        # is to act as if no return ever happened at all.
+        # FIXME - even in an indy branches situation, there should
+        # still be an option for the library to accept the item
+        # and transfer it to its owning library.
+        return ( $doreturn, $messages, $issue, $borrower );
     }
 
     if ( $item->{'wthdrawn'} ) { # book has been cancelled
-- 
1.6.3.3




More information about the Koha-patches mailing list