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

(-)a/reserve/placerequest.pl (-10 / +11 lines)
Lines 44-50 my $branch = $input->param('pickup'); Link Here
44
my $startdate      = $input->param('reserve_date') || '';
44
my $startdate      = $input->param('reserve_date') || '';
45
my @rank           = $input->multi_param('rank-request');
45
my @rank           = $input->multi_param('rank-request');
46
my $title          = $input->param('title');
46
my $title          = $input->param('title');
47
my @checkitems      = $input->multi_param('checkitem');
47
my @checkitems = $input->multi_param('checkitem');
48
my $item_group_id  = $input->param('item_group_id');
48
my $item_group_id  = $input->param('item_group_id');
49
my $expirationdate = $input->param('expiration_date');
49
my $expirationdate = $input->param('expiration_date');
50
my $itemtype       = $input->param('itemtype') || undef;
50
my $itemtype       = $input->param('itemtype') || undef;
Lines 72-78 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
72
72
73
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
73
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
74
        if ( @checkitems ) {
74
        if ( @checkitems ) {
75
            for ( my $i = 0; $i < scalar @checkitems; $i++ ){
75
            for ( my $i = 0 ; $i < scalar @checkitems ; $i++ ) {
76
                my $checkitem = $checkitems[$i];
76
                my $checkitem = $checkitems[$i];
77
                if ( my $item_pickup_location = $input->param("item_pickup_$checkitem") ) {
77
                if ( my $item_pickup_location = $input->param("item_pickup_$checkitem") ) {
78
78
Lines 82-90 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
82
                        $biblionumber = $item->biblionumber;
82
                        $biblionumber = $item->biblionumber;
83
                    }
83
                    }
84
84
85
                    my $can_item_be_reserved = CanItemBeReserved($patron, $item, $item_pickup_location)->{status};
85
                    my $can_item_be_reserved = CanItemBeReserved( $patron, $item, $item_pickup_location )->{status};
86
86
87
                    if ( $can_item_be_reserved eq 'OK' || ( $can_item_be_reserved ne 'itemAlreadyOnHold' && $can_override ) ) {
87
                    if ( $can_item_be_reserved eq 'OK'
88
                        || ( $can_item_be_reserved ne 'itemAlreadyOnHold' && $can_override ) )
89
                    {
88
                        AddReserve(
90
                        AddReserve(
89
                            {
91
                            {
90
                                branchcode       => $item_pickup_location,
92
                                branchcode       => $item_pickup_location,
Lines 102-109 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
102
                            }
104
                            }
103
                        );
105
                        );
104
106
105
                    }
107
                    } else {
106
                    else {
107
                        $failed_holds{$can_item_be_reserved} = 1;
108
                        $failed_holds{$can_item_be_reserved} = 1;
108
                    }
109
                    }
109
                }
110
                }
Lines 157-167 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
157
158
158
    my $redirect_url = URI->new("request.pl");
159
    my $redirect_url = URI->new("request.pl");
159
    my @failed_hold_msgs = ();
160
    my @failed_hold_msgs = ();
161
160
    #NOTE: Deduplicate failed hold reason statuses/codes
162
    #NOTE: Deduplicate failed hold reason statuses/codes
161
    foreach my $msg (keys %failed_holds){
163
    foreach my $msg ( keys %failed_holds ) {
162
        push(@failed_hold_msgs,$msg);
164
        push( @failed_hold_msgs, $msg );
163
    }
165
    }
164
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs);
166
    $redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs );
165
    print $input->redirect($redirect_url);
167
    print $input->redirect($redirect_url);
166
}
168
}
167
elsif ( $borrowernumber eq '' ) {
169
elsif ( $borrowernumber eq '' ) {
168
- 

Return to bug 15565