From f88ea5ebe89a3750d4612869ed6ca437a0558e9b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 19 Aug 2024 11:45:14 +0000 Subject: [PATCH] Bug 37650: Add lookahead days in CheckReserves call in returns.pl Content-Type: text/plain; charset=utf-8 Test plan: Enable future holds. Put a positive value in ConfirmFutureHolds. Add a hold for tomorrow and pickup at B. Check item in at A. Confirm hold. Without this patch you should see a warn on L182 and L253. With this patch, they should be gone. NOTE: Before bug 34972 no transfer was created for future holds. See also the 22.11 patch on Bugzilla. Signed-off-by: Marcel de Rooy --- circ/returns.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 72e004a795..74df297a27 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -143,7 +143,7 @@ foreach ( $query->param ) { push( @inputloop, \%input ); } -my $op = $query->param('op'); +my $op = $query->param('op') // q{}; ############ # Deal with the requests.... @@ -177,7 +177,7 @@ if ( $query->param('reserve_id') && $op eq 'cud-affect_reserve') { } # check if we have other reserves for this document, if we have a result send the message of transfer # FIXME do we need to do this if we didn't take the cancel_reserve branch above? - my ( undef, $nextreservinfo, undef ) = CheckReserves($item); + my ( undef, $nextreservinfo, undef ) = CheckReserves( $item, C4::Context->preference('ConfirmFutureHolds') ); if ( $userenv_branch ne $nextreservinfo->{'branchcode'} ) { my $patron = Koha::Patrons->find( $nextreservinfo->{'borrowernumber'} ); -- 2.30.2