Lines 180-186
$template->param( branch => $branch );
Link Here
|
180 |
# |
180 |
# |
181 |
# |
181 |
# |
182 |
if ( $query->param('place_reserve') ) { |
182 |
if ( $query->param('place_reserve') ) { |
183 |
my $reserve_cnt = 0; |
183 |
my $add_to_hold_group = $query->param('add_to_hold_group'); |
|
|
184 |
my $reserve_cnt = 0; |
184 |
if ($maxreserves) { |
185 |
if ($maxreserves) { |
185 |
$reserve_cnt = $patron->holds->count_holds; |
186 |
$reserve_cnt = $patron->holds->count_holds; |
186 |
} |
187 |
} |
Lines 213-218
if ( $query->param('place_reserve') ) {
Link Here
|
213 |
} |
214 |
} |
214 |
|
215 |
|
215 |
my @failed_holds; |
216 |
my @failed_holds; |
|
|
217 |
my $hold_group; |
216 |
while (@selectedItems) { |
218 |
while (@selectedItems) { |
217 |
my $biblioNum = shift(@selectedItems); |
219 |
my $biblioNum = shift(@selectedItems); |
218 |
my $itemNum = shift(@selectedItems); |
220 |
my $itemNum = shift(@selectedItems); |
Lines 306-311
if ( $query->param('place_reserve') ) {
Link Here
|
306 |
|
308 |
|
307 |
# Here we actually do the reserveration. Stage 3. |
309 |
# Here we actually do the reserveration. Stage 3. |
308 |
if ($canreserve) { |
310 |
if ($canreserve) { |
|
|
311 |
if ($add_to_hold_group) { |
312 |
|
313 |
#NOTE: We wait to create a hold group until we know that we can actually place a hold/reserve |
314 |
if ( !$hold_group ) { |
315 |
$hold_group = Koha::HoldGroup->new->store; |
316 |
} |
317 |
} |
309 |
my $reserve_id = AddReserve( |
318 |
my $reserve_id = AddReserve( |
310 |
{ |
319 |
{ |
311 |
branchcode => $branch, |
320 |
branchcode => $branch, |
Lines 320-325
if ( $query->param('place_reserve') ) {
Link Here
|
320 |
found => undef, |
329 |
found => undef, |
321 |
itemtype => $itemtype, |
330 |
itemtype => $itemtype, |
322 |
item_group_id => $item_group_id, |
331 |
item_group_id => $item_group_id, |
|
|
332 |
hold_group_id => $hold_group ? $hold_group->id : undef, |
323 |
} |
333 |
} |
324 |
); |
334 |
); |
325 |
if( $reserve_id ){ |
335 |
if( $reserve_id ){ |