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

(-)a/C4/Circulation.pm (+1 lines)
Lines 2058-2063 sub AddReturn { Link Here
2058
    # if we don't have a reserve with the status W, we launch the Checkreserves routine
2058
    # if we don't have a reserve with the status W, we launch the Checkreserves routine
2059
    my ($resfound, $resrec);
2059
    my ($resfound, $resrec);
2060
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2060
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2061
2061
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn );
2062
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn );
2062
    if ($resfound) {
2063
    if ($resfound) {
2063
        $resrec->{'ResFound'} = $resfound;
2064
        $resrec->{'ResFound'} = $resfound;
(-)a/C4/Reserves.pm (-5 / +5 lines)
Lines 186-192 sub AddReserve { Link Here
186
    }
186
    }
187
    my ($waitingdate, $lastpickupdate);
187
    my ($waitingdate, $lastpickupdate);
188
188
189
    my $item = C4::Items::GetItem( $checkitem );
189
    my $item = Koha::Items->find( $checkitem ); #FIXME Prevent bad calls
190
    # If the reserv had the waiting status, we had the value of the resdate
190
    # If the reserv had the waiting status, we had the value of the resdate
191
    if ( $found eq 'W' ) {
191
    if ( $found eq 'W' ) {
192
        $waitingdate = $resdate;
192
        $waitingdate = $resdate;
Lines 897-904 sub CheckReserves { Link Here
897
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$item->effective_itemtype);
897
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$item->effective_itemtype);
898
                    next if ($branchitemrule->{'holdallowed'} == 0);
898
                    next if ($branchitemrule->{'holdallowed'} == 0);
899
                    next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $patron->branchcode));
899
                    next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $patron->branchcode));
900
                    my $hold_fulfillment_policy = $branchitemrule->{hold_fulfillment_policy};
900
                    my $hold_fulfillment_policy = $branchitemrule->{'hold_fulfillment_policy'};
901
                    next if ( ($branchitemrule->{hold_fulfillment_policy} ne 'any') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) );
901
902
                    next if ( ($branchitemrule->{'hold_fulfillment_policy'} ne 'any') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) );
902
                    next unless $item->can_be_transferred( { to => scalar Koha::Libraries->find( $res->{branchcode} ) } );
903
                    next unless $item->can_be_transferred( { to => scalar Koha::Libraries->find( $res->{branchcode} ) } );
903
                    $priority = $res->{'priority'};
904
                    $priority = $res->{'priority'};
904
                    $highest  = $res;
905
                    $highest  = $res;
Lines 1198-1204 sub ModReserveAffect { Link Here
1198
    $hold->itemnumber($itemnumber);
1199
    $hold->itemnumber($itemnumber);
1199
    $hold->set_waiting($transferToDo);
1200
    $hold->set_waiting($transferToDo);
1200
1201
1201
    my $item = C4::Items::GetItem( $itemnumber );
1202
    my $item = Koha::Items->find( $itemnumber );
1202
    my $borrower = Koha::Patrons->find( $borrowernumber );
1203
    my $borrower = Koha::Patrons->find( $borrowernumber );
1203
    $borrower = $borrower->unblessed;
1204
    $borrower = $borrower->unblessed;
1204
    my $lastpickupdate = GetLastPickupDate( $hold, $item, $borrower );
1205
    my $lastpickupdate = GetLastPickupDate( $hold, $item, $borrower );
1205
- 

Return to bug 8367