From 9dec888d789b90a81c73759923b5539706210930 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 23 Aug 2009 08:53:39 -0400 Subject: [PATCH] bug 3409 followup: always set holdinglibrary to library last seen at Signed-off-by: Galen Charlton --- C4/Circulation.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index ab4f7a5ff9..117ef83512 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1469,13 +1469,11 @@ sub AddReturn { $messages->{'WasReturned'} = 1; # FIXME is the "= 1" right? This could be the borrower hash. } - - - # We update the holdingbranch from circControlBranch variable - UpdateHoldingbranch($circControlBranch,$item->{'itemnumber'}); - $item->{'holdingbranch'} = $circControlBranch; - - + # the holdingbranch is updated if the document is returned to another location. + if ($item->{'holdingbranch'} ne $branch) { + UpdateHoldingbranch($branch, $item->{'itemnumber'}); + $item->{'holdingbranch'} = $branch; # update item data holdingbranch too + } ModDateLastSeen( $item->{'itemnumber'} ); ModItem({ onloan => undef }, $issue->{'biblionumber'}, $item->{'itemnumber'}); } -- 2.39.5