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

(-)a/C4/Circulation.pm (-5 / +3 lines)
Lines 1923-1929 sub AddReturn { Link Here
1923
    my $messages;
1923
    my $messages;
1924
    my $patron;
1924
    my $patron;
1925
    my $doreturn       = 1;
1925
    my $doreturn       = 1;
1926
    my $validTransfert = 0;
1926
    my $validTransfer = 1;
1927
    my $stat_type = 'return';
1927
    my $stat_type = 'return';
1928
1928
1929
    # get information on item
1929
    # get information on item
Lines 2084-2095 sub AddReturn { Link Here
2084
            $sth->execute( $item->itemnumber );
2084
            $sth->execute( $item->itemnumber );
2085
2085
2086
            # If we are completing a transfer we should not generate a new transfer from return policy
2086
            # If we are completing a transfer we should not generate a new transfer from return policy
2087
            $returnbranch = $branch;
2087
            $validTransfer = 0;
2088
        } else {
2088
        } else {
2089
            $messages->{'WrongTransfer'}     = $tobranch;
2089
            $messages->{'WrongTransfer'}     = $tobranch;
2090
            $messages->{'WrongTransferItem'} = $item->itemnumber;
2090
            $messages->{'WrongTransferItem'} = $item->itemnumber;
2091
        }
2091
        }
2092
        $validTransfert = 1;
2093
    }
2092
    }
2094
2093
2095
    # fix up the accounts.....
2094
    # fix up the accounts.....
Lines 2212-2218 sub AddReturn { Link Here
2212
    }
2211
    }
2213
2212
2214
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2213
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2215
    if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){
2214
    if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){
2216
        my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode';
2215
        my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode';
2217
        if  (C4::Context->preference("AutomaticItemReturn"    ) or
2216
        if  (C4::Context->preference("AutomaticItemReturn"    ) or
2218
            (C4::Context->preference("UseBranchTransferLimits") and
2217
            (C4::Context->preference("UseBranchTransferLimits") and
2219
- 

Return to bug 26078