From bcb481e387a32f8173c34828d1c7206ffe987a67 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Aug 2022 08:41:37 +0200 Subject: [PATCH] Bug 30718: Fix renewal with due date This was a test added by the following commit: commit 99eccc18ed4a21fa416a3d61fed3f70825dc2203 Date: Thu Jun 16 10:10:09 2011 +0100 Bug 5549 : Handle datetimes on return It's no longer needed now, we can pass a DateTime or an ISO-formatted date --- C4/Circulation.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 65b8ddf256c..7b028bed0fc 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3094,8 +3094,7 @@ sub AddRenewal { $borrowernumber ||= $issue->borrowernumber; if ( defined $datedue && ref $datedue ne 'DateTime' ) { - carp 'Invalid date passed to AddRenewal.'; - return; + $datedue = dt_from_string($datedue, 'sql'); } my $patron = Koha::Patrons->find( $borrowernumber ) or return; # FIXME Should do more than just return -- 2.25.1