Lines 170-177
if ( $query->param('reserve_id') && $op eq 'cud-affect_reserve') {
Link Here
|
170 |
# i.e., whether to apply waiting status |
170 |
# i.e., whether to apply waiting status |
171 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id ); |
171 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id ); |
172 |
|
172 |
|
|
|
173 |
my $hold = Koha::Holds->find($reserve_id); |
173 |
if ($diffBranchSend) { |
174 |
if ($diffBranchSend) { |
174 |
ModItemTransfer( $itemnumber, $userenv_branch, $diffBranchSend, 'Reserve' ); |
175 |
my $tobranch = Koha::Libraries->find( $hold->branchcode ); |
|
|
176 |
|
177 |
# Add transfer, enqueue if one is already in the queue, and immediately set to in transit |
178 |
my $transfer = $item->request_transfer( { to => $tobranch, reason => 'Reserve', enqueue => 1 } ); |
179 |
$transfer->transit; |
175 |
} |
180 |
} |
176 |
} |
181 |
} |
177 |
# check if we have other reserves for this document, if we have a result send the message of transfer |
182 |
# check if we have other reserves for this document, if we have a result send the message of transfer |
Lines 612-618
if ( $messages->{'ResFound'} ) {
Link Here
|
612 |
ModReserveAffect( $itemnumber, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id ); |
617 |
ModReserveAffect( $itemnumber, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id ); |
613 |
|
618 |
|
614 |
if ($diffBranchSend) { |
619 |
if ($diffBranchSend) { |
615 |
ModItemTransfer( $itemnumber, $item->holdingbranch, $reserve->{branchcode}, 'Reserve' ); |
620 |
my $tobranch = Koha::Libraries->find( $reserve->{branchcode} ); |
|
|
621 |
# Add transfer, enqueue if one is already in the queue, and immediately set to in transit |
622 |
my $transfer = $item->request_transfer( { to => $tobranch, reason => 'Reserve', enqueue => 1 } ); |
623 |
$transfer->transit; |
616 |
} |
624 |
} |
617 |
|
625 |
|
618 |
$template->param( |
626 |
$template->param( |
619 |
- |
|
|