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

(-)a/Koha/CurbsidePickup.pm (-4 / +2 lines)
Lines 62-69 sub new { Link Here
62
62
63
    if ( $policy->enable_waiting_holds_only ) {
63
    if ( $policy->enable_waiting_holds_only ) {
64
        my $patron        = Koha::Patrons->find( $params->{borrowernumber} );
64
        my $patron        = Koha::Patrons->find( $params->{borrowernumber} );
65
        my $waiting_holds = $patron->holds->search(
65
        my $waiting_holds = $patron->holds->waiting->search( { branchcode => $params->{branchcode} } );
66
            { found => 'W', branchcode => $params->{branchcode} } );
67
66
68
        Koha::Exceptions::CurbsidePickup::NoWaitingHolds->throw
67
        Koha::Exceptions::CurbsidePickup::NoWaitingHolds->throw
69
          unless $waiting_holds->count;
68
          unless $waiting_holds->count;
Lines 245-251 sub mark_as_delivered { Link Here
245
    my $holds           = $patron->holds;
244
    my $holds           = $patron->holds;
246
    my $branchcode = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
245
    my $branchcode = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
247
    foreach my $hold ( $holds->as_list ) {
246
    foreach my $hold ( $holds->as_list ) {
248
        if ( $hold->found eq 'W' && $branchcode && $hold->branchcode eq $branchcode ) {
247
        if ( $hold->is_waiting && $branchcode && $hold->branchcode eq $branchcode ) {
249
            my ( $issuingimpossible, $needsconfirmation ) =
248
            my ( $issuingimpossible, $needsconfirmation ) =
250
              C4::Circulation::CanBookBeIssued( $patron, $hold->item->barcode );
249
              C4::Circulation::CanBookBeIssued( $patron, $hold->item->barcode );
251
250
252
- 

Return to bug 30650