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 69-75
if ( $patron ) {
Link Here
|
69 |
|
69 |
|
70 |
my $can_override = C4::Context->preference('AllowHoldPolicyOverride'); |
70 |
my $can_override = C4::Context->preference('AllowHoldPolicyOverride'); |
71 |
if ( @checkitems ) { |
71 |
if ( @checkitems ) { |
72 |
for ( my $i = 0; $i < scalar @checkitems; $i++ ){ |
72 |
for ( my $i = 0 ; $i < scalar @checkitems ; $i++ ) { |
73 |
my $checkitem = $checkitems[$i]; |
73 |
my $checkitem = $checkitems[$i]; |
74 |
if ( my $item_pickup_location = $input->param("item_pickup_$checkitem") ) { |
74 |
if ( my $item_pickup_location = $input->param("item_pickup_$checkitem") ) { |
75 |
|
75 |
|
Lines 79-87
if ( $patron ) {
Link Here
|
79 |
$biblionumber = $item->biblionumber; |
79 |
$biblionumber = $item->biblionumber; |
80 |
} |
80 |
} |
81 |
|
81 |
|
82 |
my $can_item_be_reserved = CanItemBeReserved($patron, $item, $item_pickup_location)->{status}; |
82 |
my $can_item_be_reserved = CanItemBeReserved( $patron, $item, $item_pickup_location )->{status}; |
83 |
|
83 |
|
84 |
if ( $can_item_be_reserved eq 'OK' || ( $can_item_be_reserved ne 'itemAlreadyOnHold' && $can_override ) ) { |
84 |
if ( $can_item_be_reserved eq 'OK' |
|
|
85 |
|| ( $can_item_be_reserved ne 'itemAlreadyOnHold' && $can_override ) ) |
86 |
{ |
85 |
AddReserve( |
87 |
AddReserve( |
86 |
{ |
88 |
{ |
87 |
branchcode => $item_pickup_location, |
89 |
branchcode => $item_pickup_location, |
Lines 99-106
if ( $patron ) {
Link Here
|
99 |
} |
101 |
} |
100 |
); |
102 |
); |
101 |
|
103 |
|
102 |
} |
104 |
} else { |
103 |
else { |
|
|
104 |
$failed_holds{$can_item_be_reserved} = 1; |
105 |
$failed_holds{$can_item_be_reserved} = 1; |
105 |
} |
106 |
} |
106 |
} |
107 |
} |
Lines 154-164
if ( $patron ) {
Link Here
|
154 |
|
155 |
|
155 |
my $redirect_url = URI->new("request.pl"); |
156 |
my $redirect_url = URI->new("request.pl"); |
156 |
my @failed_hold_msgs = (); |
157 |
my @failed_hold_msgs = (); |
|
|
158 |
|
157 |
#NOTE: Deduplicate failed hold reason statuses/codes |
159 |
#NOTE: Deduplicate failed hold reason statuses/codes |
158 |
foreach my $msg (keys %failed_holds){ |
160 |
foreach my $msg ( keys %failed_holds ) { |
159 |
push(@failed_hold_msgs,$msg); |
161 |
push( @failed_hold_msgs, $msg ); |
160 |
} |
162 |
} |
161 |
$redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs); |
163 |
$redirect_url->query_form( biblionumber => [@biblionumbers], failed_holds => \@failed_hold_msgs ); |
162 |
print $input->redirect($redirect_url); |
164 |
print $input->redirect($redirect_url); |
163 |
} |
165 |
} |
164 |
elsif ( $borrowernumber eq '' ) { |
166 |
elsif ( $borrowernumber eq '' ) { |
165 |
- |
|
|