From 7495e87c4977d095a9d3c0080d27858a40d2f67e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 4 Oct 2021 12:35:44 +0200 Subject: [PATCH] Bug 27945: (follow-up) Clarify 'same day' behavior Don't use MySQLism --- Koha/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index f3b7d22afa3..de25e861052 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -975,7 +975,7 @@ sub can_request_article { my $count = Koha::ArticleRequests->search( [ { borrowernumber => $self->borrowernumber, status => [ 'REQUESTED', 'PENDING', 'PROCESSING' ] }, - { borrowernumber => $self->borrowernumber, status => 'COMPLETED', updated_on => { '>=' => \'DATE(NOW())' } }, + { borrowernumber => $self->borrowernumber, status => 'COMPLETED', updated_on => { '>=' => \'CAST(NOW() AS DATE)' } }, ] )->count; return $count < $limit ? 1 : 0; -- 2.25.1