From 6c0d81bcd376aeadfa6dfdab2123e6494dd270d2 Mon Sep 17 00:00:00 2001 From: Johanna Raisa Date: Mon, 25 Sep 2017 14:21:29 +0300 Subject: [PATCH 3/4] Bug 9525: Fixing floating on return Sponsored-by: Koha-Suomi Oy --- C4/Circulation.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d5db713087..bf79a85916 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2146,7 +2146,7 @@ sub AddReturn { my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch); # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer - if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE')){ + if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} and (not($floatingType) || $floatingType eq 'POSSIBLE')){ my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; if ( not($floatingType && $floatingType eq 'POSSIBLE') and (C4::Context->preference("AutomaticItemReturn" ) or @@ -2165,7 +2165,7 @@ sub AddReturn { #This elsif-clause copypastes the upper if-clause. This is horrible and I cry, but cannot refactor this mess now :( due to Koha upstream master stuff looming. elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) - and not($messages->{'WrongTransfer'}) + and not $messages->{'WrongTransfer'} && $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it. #We can infer that the transfer was averted because of a floating rule. #Make sure we dont log the same floating denial multiple times -- 2.17.1