|
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 308-313
if ( $query->param('place_reserve') ) {
Link Here
|
| 308 |
|
310 |
|
| 309 |
# Here we actually do the reserveration. Stage 3. |
311 |
# Here we actually do the reserveration. Stage 3. |
| 310 |
if ($canreserve) { |
312 |
if ($canreserve) { |
|
|
313 |
if ($add_to_hold_group){ |
| 314 |
#NOTE: We wait to create a hold group until we know that we can actually place a hold/reserve |
| 315 |
if ( ! $hold_group ){ |
| 316 |
$hold_group = Koha::HoldGroup->new->store; |
| 317 |
} |
| 318 |
} |
| 311 |
my $reserve_id = AddReserve( |
319 |
my $reserve_id = AddReserve( |
| 312 |
{ |
320 |
{ |
| 313 |
branchcode => $branch, |
321 |
branchcode => $branch, |
|
Lines 321-326
if ( $query->param('place_reserve') ) {
Link Here
|
| 321 |
itemnumber => $itemNum, |
329 |
itemnumber => $itemNum, |
| 322 |
found => $found, |
330 |
found => $found, |
| 323 |
itemtype => $itemtype, |
331 |
itemtype => $itemtype, |
|
|
332 |
hold_group_id => $hold_group ? $hold_group->id : undef, |
| 324 |
} |
333 |
} |
| 325 |
); |
334 |
); |
| 326 |
$failed_holds++ unless $reserve_id; |
335 |
$failed_holds++ unless $reserve_id; |