|
Lines 195-200
foreach my $biblioNumber (@biblionumbers) {
Link Here
|
| 195 |
# |
195 |
# |
| 196 |
# |
196 |
# |
| 197 |
if ( $query->param('place_reserve') ) { |
197 |
if ( $query->param('place_reserve') ) { |
|
|
198 |
my $add_to_hold_group = $query->param('add_to_hold_group'); |
| 198 |
my $reserve_cnt = 0; |
199 |
my $reserve_cnt = 0; |
| 199 |
if ($maxreserves) { |
200 |
if ($maxreserves) { |
| 200 |
$reserve_cnt = $patron->holds->count_grouped; |
201 |
$reserve_cnt = $patron->holds->count_grouped; |
|
Lines 239-244
if ( $query->param('place_reserve') ) {
Link Here
|
| 239 |
} |
240 |
} |
| 240 |
|
241 |
|
| 241 |
my $failed_holds = 0; |
242 |
my $failed_holds = 0; |
|
|
243 |
my $hold_group; |
| 242 |
while (@selectedItems) { |
244 |
while (@selectedItems) { |
| 243 |
my $biblioNum = shift(@selectedItems); |
245 |
my $biblioNum = shift(@selectedItems); |
| 244 |
my $itemNum = shift(@selectedItems); |
246 |
my $itemNum = shift(@selectedItems); |
|
Lines 322-327
if ( $query->param('place_reserve') ) {
Link Here
|
| 322 |
|
324 |
|
| 323 |
# Here we actually do the reserveration. Stage 3. |
325 |
# Here we actually do the reserveration. Stage 3. |
| 324 |
if ($canreserve) { |
326 |
if ($canreserve) { |
|
|
327 |
if ($add_to_hold_group){ |
| 328 |
#NOTE: We wait to create a hold group until we know that we can actually place a hold/reserve |
| 329 |
if ( ! $hold_group ){ |
| 330 |
$hold_group = Koha::HoldGroup->new->store; |
| 331 |
} |
| 332 |
} |
| 325 |
my $reserve_id = AddReserve( |
333 |
my $reserve_id = AddReserve( |
| 326 |
{ |
334 |
{ |
| 327 |
branchcode => $branch, |
335 |
branchcode => $branch, |
|
Lines 335-340
if ( $query->param('place_reserve') ) {
Link Here
|
| 335 |
itemnumber => $itemNum, |
343 |
itemnumber => $itemNum, |
| 336 |
found => $found, |
344 |
found => $found, |
| 337 |
itemtype => $itemtype, |
345 |
itemtype => $itemtype, |
|
|
346 |
hold_group_id => $hold_group ? $hold_group->id : undef, |
| 338 |
} |
347 |
} |
| 339 |
); |
348 |
); |
| 340 |
$failed_holds++ unless $reserve_id; |
349 |
$failed_holds++ unless $reserve_id; |
| 341 |
- |
|
|