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

(-)a/C4/Circulation.pm (-2 / +1 lines)
Lines 2166-2172 sub AddReturn { Link Here
2166
    my $transfer = $item->get_transfer;
2166
    my $transfer = $item->get_transfer;
2167
2167
2168
    # if we have a transfer to complete, we update the line of transfers with the datearrived
2168
    # if we have a transfer to complete, we update the line of transfers with the datearrived
2169
    my $is_in_rotating_collection = C4::RotatingCollections::isItemInAnyCollection( $item->itemnumber );
2170
    if ($transfer) {
2169
    if ($transfer) {
2171
        $validTransfer = 0;
2170
        $validTransfer = 0;
2172
        if ( $transfer->in_transit ) {
2171
        if ( $transfer->in_transit ) {
Lines 2278-2284 sub AddReturn { Link Here
2278
    }
2277
    }
2279
2278
2280
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2279
    # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer
2281
    if ( $validTransfer && !$is_in_rotating_collection
2280
    if ( $validTransfer && !C4::RotatingCollections::isItemInAnyCollection( $item->itemnumber )
2282
        && ( $doreturn or $messages->{'NotIssued'} )
2281
        && ( $doreturn or $messages->{'NotIssued'} )
2283
        and !$resfound
2282
        and !$resfound
2284
        and ( $branch ne $returnbranch )
2283
        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