Bug 37651: Add ConfirmFutureHolds to item->current_holds

Test plan:
Add future item level hold for another branch.
Check in. Confirm and transfer.
Note that without this patch, there is no patron info for the column
On hold for on transferstoreceive.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 503a81efe1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Marcel de Rooy 2024-08-15 16:04:25 +02:00 committed by Paul Derscheid
parent d27a1c98ec
commit 9b8172859f
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 2 additions and 1 deletions

View File

@ -1172,11 +1172,12 @@ sub current_holds {
my ($self) = @_;
my $attributes = { order_by => 'priority' };
my $dtf = Koha::Database->new->schema->storage->datetime_parser;
my $dt = dt_from_string()->add( days => C4::Context->preference('ConfirmFutureHolds') || 0 );
my $params = {
itemnumber => $self->itemnumber,
suspend => 0,
-or => [
reservedate => { '<=' => $dtf->format_date(dt_from_string) },
reservedate => { '<=' => $dtf->format_date($dt) },
waitingdate => { '!=' => undef },
],
};