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

(-)a/Koha/Biblio.pm (-6 / +6 lines)
Lines 704-721 sub holds { Link Here
704
704
705
=head3 current_holds
705
=head3 current_holds
706
706
707
my $holds = $biblio->current_holds
707
    my $holds = $biblio->current_holds
708
708
709
Return the holds placed on this bibliographic record.
709
    Return the holds placed on this bibliographic record.
710
It does not include future holds.
710
    Respects the lookahead days in ConfirmFutureHolds pref.
711
711
712
=cut
712
=cut
713
713
714
sub current_holds {
714
sub current_holds {
715
    my ($self) = @_;
715
    my ($self) = @_;
716
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
716
    my $dtf    = Koha::Database->new->schema->storage->datetime_parser;
717
    my $dt     = dt_from_string()->add( days => C4::Context->preference('ConfirmFutureHolds') || 0 );
717
    return $self->holds(
718
    return $self->holds(
718
        { reservedate => { '<=' => $dtf->format_date(dt_from_string) } } );
719
        { reservedate => { '<=' => $dtf->format_date($dt) } } );
719
}
720
}
720
721
721
=head3 biblioitem
722
=head3 biblioitem
722
- 

Return to bug 37651