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

(-)a/C4/Circulation.pm (-2 / +1 lines)
Lines 2165-2171 sub AddReturn { Link Here
2165
    my $transfer = $item->get_transfer;
2165
    my $transfer = $item->get_transfer;
2166
2166
2167
    # if we have a transfer to complete, we update the line of transfers with the datearrived
2167
    # if we have a transfer to complete, we update the line of transfers with the datearrived
2168
    my $is_in_rotating_collection = C4::RotatingCollections::isItemInAnyCollection( $item->itemnumber );
2169
    if ($transfer) {
2168
    if ($transfer) {
2170
        $validTransfer = 0;
2169
        $validTransfer = 0;
2171
        if ( $transfer->in_transit ) {
2170
        if ( $transfer->in_transit ) {
Lines 2277-2283 sub AddReturn { Link Here
2277
    }
2276
    }
2278
2277
2279
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2278
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2280
    if ( $validTransfer && !$is_in_rotating_collection
2279
    if ( $validTransfer && !C4::RotatingCollections::isItemInAnyCollection( $item->itemnumber )
2281
        && ( $doreturn or $messages->{'NotIssued'} )
2280
        && ( $doreturn or $messages->{'NotIssued'} )
2282
        and !$resfound
2281
        and !$resfound
2283
        and ( $branch ne $returnbranch )
2282
        and ( $branch ne $returnbranch )
(-)a/C4/RotatingCollections.pm (-2 / +1 lines)
Lines 571-577 sub isItemInAnyCollection { Link Here
571
    my $dbh = C4::Context->dbh;
571
    my $dbh = C4::Context->dbh;
572
572
573
    my $sth = $dbh->prepare(
573
    my $sth = $dbh->prepare(
574
        "SELECT itemnumber FROM collections_tracking WHERE itemnumber = ?");
574
        "SELECT itemnumber FROM collections_tracking JOIN collections USING (colId) WHERE itemnumber = ?");
575
    $sth->execute($itemnumber) or return (0);
575
    $sth->execute($itemnumber) or return (0);
576
576
577
    my $row = $sth->fetchrow_hashref;
577
    my $row = $sth->fetchrow_hashref;
578
- 

Return to bug 17202