From 228b5d9fd1f8945a3413c507302e6d8fe9d21b90 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 --- C4/Circulation.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d8b573b344..d59d4e3e02 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2165,7 +2165,7 @@ sub AddReturn { my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch); # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer - if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE' ){ + if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (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 @@ -2184,7 +2184,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