From 5593a2816471b351a433081ebe292898219840cb Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 23 Aug 2009 10:01:19 -0400 Subject: [PATCH] implement bailing out of AddReturn if IndependantBranches is on 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 --- C4/Circulation.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index b1fe99ab61..b1a6e265ae 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 -- 2.39.2