Lines 71-76
my ( $template, $librarian, $cookie, $flags ) = get_template_and_user(
Link Here
|
71 |
|
71 |
|
72 |
my $sessionID = $query->cookie("CGISESSID"); |
72 |
my $sessionID = $query->cookie("CGISESSID"); |
73 |
my $session = get_session($sessionID); |
73 |
my $session = get_session($sessionID); |
|
|
74 |
my $desk_id = C4::Context->userenv->{"desk_id"} || ''; |
74 |
|
75 |
|
75 |
# Print a reserve slip on this page |
76 |
# Print a reserve slip on this page |
76 |
if ( $query->param('print_slip') ) { |
77 |
if ( $query->param('print_slip') ) { |
Lines 155-161
if ( $query->param('reserve_id') ) {
Link Here
|
155 |
my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; |
156 |
my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; |
156 |
# diffBranchSend tells ModReserveAffect whether document is expected in this library or not, |
157 |
# diffBranchSend tells ModReserveAffect whether document is expected in this library or not, |
157 |
# i.e., whether to apply waiting status |
158 |
# i.e., whether to apply waiting status |
158 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id ); |
159 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id ); |
159 |
} |
160 |
} |
160 |
# check if we have other reserves for this document, if we have a return send the message of transfer |
161 |
# check if we have other reserves for this document, if we have a return send the message of transfer |
161 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); |
162 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); |
Lines 414-420
if ( $messages->{'ResFound'}) {
Link Here
|
414 |
my $biblio = $item->biblio; |
415 |
my $biblio = $item->biblio; |
415 |
|
416 |
|
416 |
my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; |
417 |
my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; |
417 |
ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id} ); |
418 |
ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id ); |
418 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); |
419 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); |
419 |
$template->param( |
420 |
$template->param( |
420 |
hold_auto_filled => 1, |
421 |
hold_auto_filled => 1, |