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

(-)a/Koha/Biblio.pm (-6 / +6 lines)
Lines 797-814 sub old_holds { Link Here
797
797
798
=head3 current_holds
798
=head3 current_holds
799
799
800
my $holds = $biblio->current_holds
800
    my $holds = $biblio->current_holds
801
801
802
Return the holds placed on this bibliographic record.
802
    Return the holds placed on this bibliographic record.
803
It does not include future holds.
803
    Respects the lookahead days in ConfirmFutureHolds pref.
804
804
805
=cut
805
=cut
806
806
807
sub current_holds {
807
sub current_holds {
808
    my ($self) = @_;
808
    my ($self) = @_;
809
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
809
    my $dtf    = Koha::Database->new->schema->storage->datetime_parser;
810
    my $dt     = dt_from_string()->add( days => C4::Context->preference('ConfirmFutureHolds') || 0 );
810
    return $self->holds(
811
    return $self->holds(
811
        { reservedate => { '<=' => $dtf->format_date(dt_from_string) } } );
812
        { reservedate => { '<=' => $dtf->format_date($dt) } } );
812
}
813
}
813
814
814
=head3 biblioitem
815
=head3 biblioitem
815
- 

Return to bug 37651