Lines 975-981
sub can_request_article {
Link Here
|
975 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
975 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
976 |
my $compdate = dt_from_string->add( days => -1 ); |
976 |
my $compdate = dt_from_string->add( days => -1 ); |
977 |
my $count = Koha::ArticleRequests->search([ |
977 |
my $count = Koha::ArticleRequests->search([ |
978 |
{ borrowernumber => $self->borrowernumber, status => { '!=' => ['CANCELED','COMPLETED'] } }, |
978 |
{ borrowernumber => $self->borrowernumber, status => ['PENDING','PROCESSING'] }, |
979 |
{ borrowernumber => $self->borrowernumber, status => 'COMPLETED', updated_on => { '>', $dtf->format_date($compdate) }}, |
979 |
{ borrowernumber => $self->borrowernumber, status => 'COMPLETED', updated_on => { '>', $dtf->format_date($compdate) }}, |
980 |
])->count; |
980 |
])->count; |
981 |
return $count < $limit ? 1 : 0; |
981 |
return $count < $limit ? 1 : 0; |
982 |
- |
|
|