Lines 191-196
foreach my $biblioNumber (@biblionumbers) {
Link Here
|
191 |
# |
191 |
# |
192 |
# |
192 |
# |
193 |
if ( $query->param('place_reserve') ) { |
193 |
if ( $query->param('place_reserve') ) { |
|
|
194 |
my $add_to_hold_group = $query->param('add_to_hold_group'); |
194 |
my $reserve_cnt = 0; |
195 |
my $reserve_cnt = 0; |
195 |
if ($maxreserves) { |
196 |
if ($maxreserves) { |
196 |
$reserve_cnt = $patron->holds->count_holds; |
197 |
$reserve_cnt = $patron->holds->count_holds; |
Lines 224-229
if ( $query->param('place_reserve') ) {
Link Here
|
224 |
} |
225 |
} |
225 |
|
226 |
|
226 |
my $failed_holds = 0; |
227 |
my $failed_holds = 0; |
|
|
228 |
my $hold_group; |
227 |
while (@selectedItems) { |
229 |
while (@selectedItems) { |
228 |
my $biblioNum = shift(@selectedItems); |
230 |
my $biblioNum = shift(@selectedItems); |
229 |
my $itemNum = shift(@selectedItems); |
231 |
my $itemNum = shift(@selectedItems); |
Lines 307-312
if ( $query->param('place_reserve') ) {
Link Here
|
307 |
|
309 |
|
308 |
# Here we actually do the reserveration. Stage 3. |
310 |
# Here we actually do the reserveration. Stage 3. |
309 |
if ($canreserve) { |
311 |
if ($canreserve) { |
|
|
312 |
if ($add_to_hold_group){ |
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 |
} |
310 |
my $reserve_id = AddReserve( |
318 |
my $reserve_id = AddReserve( |
311 |
{ |
319 |
{ |
312 |
branchcode => $branch, |
320 |
branchcode => $branch, |
Lines 320-325
if ( $query->param('place_reserve') ) {
Link Here
|
320 |
itemnumber => $itemNum, |
328 |
itemnumber => $itemNum, |
321 |
found => $found, |
329 |
found => $found, |
322 |
itemtype => $itemtype, |
330 |
itemtype => $itemtype, |
|
|
331 |
hold_group_id => $hold_group ? $hold_group->id : undef, |
323 |
} |
332 |
} |
324 |
); |
333 |
); |
325 |
$failed_holds++ unless $reserve_id; |
334 |
$failed_holds++ unless $reserve_id; |
326 |
- |
|
|