View | Details | Raw Unified | Return to bug 9525
Collapse All | Expand All

(-)a/C4/Circulation.pm (-3 / +2 lines)
Lines 2146-2152 sub AddReturn { Link Here
2146
2146
2147
    my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch);
2147
    my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch);
2148
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2148
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2149
    if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE')){
2149
    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')){
2150
        my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode';
2150
        my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode';
2151
        if  ( not($floatingType && $floatingType eq 'POSSIBLE') and
2151
        if  ( not($floatingType && $floatingType eq 'POSSIBLE') and
2152
            (C4::Context->preference("AutomaticItemReturn"    ) or
2152
            (C4::Context->preference("AutomaticItemReturn"    ) or
Lines 2165-2171 sub AddReturn { Link Here
2165
    #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.
2165
    #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.
2166
    elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'})
2166
    elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'})
2167
        and !$resfound and ($branch ne $returnbranch)
2167
        and !$resfound and ($branch ne $returnbranch)
2168
        and not($messages->{'WrongTransfer'})
2168
        and not $messages->{'WrongTransfer'}
2169
        && $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it.
2169
        && $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it.
2170
                           #We can infer that the transfer was averted because of a floating rule.
2170
                           #We can infer that the transfer was averted because of a floating rule.
2171
        #Make sure we dont log the same floating denial multiple times
2171
        #Make sure we dont log the same floating denial multiple times
2172
- 

Return to bug 9525