View | Details | Raw Unified | Return to bug 37650
Collapse All | Expand All

(-)a/C4/Reserves.pm (-3 / +3 lines)
Lines 666-682 sub CanReserveBeCanceledFromOpac { Link Here
666
666
667
=head2 GetOtherReserves
667
=head2 GetOtherReserves
668
668
669
  ($messages,$nextreservinfo)=$GetOtherReserves(itemnumber);
669
  ( $messages, $nextreservinfo) = GetOtherReserves( $itemnumber, $lookahead_days );
670
670
671
Check queued list of this document and check if this document must be transferred
671
Check queued list of this document and check if this document must be transferred
672
672
673
=cut
673
=cut
674
674
675
sub GetOtherReserves {
675
sub GetOtherReserves {
676
    my ($itemnumber) = @_;
676
    my ( $itemnumber, $lookahead_days ) = @_;
677
    my $messages;
677
    my $messages;
678
    my $nextreservinfo;
678
    my $nextreservinfo;
679
    my ( undef, $checkreserves, undef ) = CheckReserves($itemnumber);
679
    my ( undef, $checkreserves, undef ) = CheckReserves( $itemnumber, undef, $lookahead_days );
680
    if ($checkreserves) {
680
    if ($checkreserves) {
681
        my $item = Koha::Items->find($itemnumber);
681
        my $item = Koha::Items->find($itemnumber);
682
        if ( $item->holdingbranch ne $checkreserves->{'branchcode'} ) {
682
        if ( $item->holdingbranch ne $checkreserves->{'branchcode'} ) {
(-)a/circ/returns.pl (-3 / +2 lines)
Lines 163-169 if ( $query->param('reserve_id') ) { Link Here
163
        ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id );
163
        ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id );
164
    }
164
    }
165
#   check if we have other reserves for this document, if we have a return send the message of transfer
165
#   check if we have other reserves for this document, if we have a return send the message of transfer
166
    my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber);
166
    my ( $messages, $nextreservinfo ) = GetOtherReserves( $itemnumber, C4::Context->preference('ConfirmFutureHolds') );
167
167
168
    my $patron = Koha::Patrons->find( $nextreservinfo );
168
    my $patron = Koha::Patrons->find( $nextreservinfo );
169
    if ( $messages->{'transfert'} ) {
169
    if ( $messages->{'transfert'} ) {
Lines 574-580 if ( $messages->{'ResFound'} ) { Link Here
574
574
575
        my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef;
575
        my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef;
576
        ModReserveAffect( $itemnumber, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id );
576
        ModReserveAffect( $itemnumber, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id );
577
        my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber});
577
        my ( $messages, $nextreservinfo ) = GetOtherReserves( $reserve->{itemnumber}, C4::Context->preference('ConfirmFutureHolds') );
578
578
579
        $template->param(
579
        $template->param(
580
            hold_auto_filled => 1,
580
            hold_auto_filled => 1,
581
- 

Return to bug 37650