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

(-)a/reserve/request.pl (-4 / +4 lines)
Lines 33-39 use List::MoreUtils qw( uniq ); Link Here
33
use Date::Calc qw( Date_to_Days );
33
use Date::Calc qw( Date_to_Days );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Auth qw( get_template_and_user );
35
use C4::Auth qw( get_template_and_user );
36
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted CanItemBeReserved IsAvailableForItemLevelRequest );
36
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted IsAvailableForItemLevelRequest );
37
use C4::Items qw( get_hostitemnumbers_of );
37
use C4::Items qw( get_hostitemnumbers_of );
38
use C4::Koha qw( getitemtypeimagelocation );
38
use C4::Koha qw( getitemtypeimagelocation );
39
use C4::Serials qw( CountSubscriptionFromBiblionumber );
39
use C4::Serials qw( CountSubscriptionFromBiblionumber );
Lines 306-314 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
306
            last;
306
            last;
307
        }
307
        }
308
308
309
        my $canReserve;
309
        if ( $patron ) {
310
        if ( $patron ) {
310
            { # CanBookBeReserved
311
            { # CanBookBeReserved
311
                my $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber );
312
                $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber, undef,{ return_all_items => 1 });
312
                if ( $canReserve->{status} eq 'OK' ) {
313
                if ( $canReserve->{status} eq 'OK' ) {
313
314
314
                    #All is OK and we can continue
315
                    #All is OK and we can continue
Lines 484-490 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
484
485
485
                    $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
486
                    $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
486
487
487
                    my $can_item_be_reserved = CanItemBeReserved( $patron, $item_object )->{status};
488
                    my $can_item_be_reserved = $canReserve->{$item_object->itemnumber}->{status};
488
                    $item->{not_holdable} = $can_item_be_reserved unless ( $can_item_be_reserved eq 'OK' );
489
                    $item->{not_holdable} = $can_item_be_reserved unless ( $can_item_be_reserved eq 'OK' );
489
490
490
                    $item->{item_level_holds} = Koha::CirculationRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
491
                    $item->{item_level_holds} = Koha::CirculationRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
491
- 

Return to bug 30860