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 158-164
if ( $query->param('reserve_id') ) {
Link Here
|
158 |
my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; |
159 |
my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; |
159 |
# diffBranchSend tells ModReserveAffect whether document is expected in this library or not, |
160 |
# diffBranchSend tells ModReserveAffect whether document is expected in this library or not, |
160 |
# i.e., whether to apply waiting status |
161 |
# i.e., whether to apply waiting status |
161 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id ); |
162 |
ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id ); |
162 |
} |
163 |
} |
163 |
# check if we have other reserves for this document, if we have a return send the message of transfer |
164 |
# check if we have other reserves for this document, if we have a return send the message of transfer |
164 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); |
165 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); |
Lines 417-423
if ( $messages->{'ResFound'}) {
Link Here
|
417 |
my $biblio = $item->biblio; |
418 |
my $biblio = $item->biblio; |
418 |
|
419 |
|
419 |
my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; |
420 |
my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; |
420 |
ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id} ); |
421 |
ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id ); |
421 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); |
422 |
my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); |
422 |
|
423 |
|
423 |
my $patron = Koha::Patrons->find( $nextreservinfo ); |
424 |
my $patron = Koha::Patrons->find( $nextreservinfo ); |