From 84e1d2fb2ba221b33a414a70c0a5377cd4c06ea1 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 Signed-off-by: Victor Grousset/tuxayo --- C4/Circulation.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 65b8ddf256..7b028bed0f 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.37.1