From b6422f00395ddd62a26a6b44031dada0186c6941 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 21 Jun 2016 15:18:51 -0300 Subject: [PATCH] Bug 14048: (followup) Use the original holding branch This patch picks the item's holding branch *before* it gets fixed by using the checkin library instead. This way the RefundLostOnReturnControl syspref set to ItemHoldingBranch is respected (otherwise, as Nick explained this behaves just like if CheckinLibrary was set) Signed-off-by: Tomas Cohen Arazi --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 08081fc..8c5f0a3 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2089,6 +2089,7 @@ sub AddReturn { # the holdingbranch is updated if the document is returned to another location. # this is always done regardless of whether the item was on loan or not + my $item_holding_branch = $item->{ holdingbranch }; if ($item->{'holdingbranch'} ne $branch) { UpdateHoldingbranch($branch, $item->{'itemnumber'}); $item->{'holdingbranch'} = $branch; # update item data holdingbranch too @@ -2128,7 +2129,7 @@ sub AddReturn { { current_branch => C4::Context->userenv->{branch}, item_home_branch => $item->{homebranch}, - item_holding_branch => $item->{holdingbranch} + item_holding_branch => $item_holding_branch } ) ) -- 2.9.0