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