From 574e2f9d6001c951145ce18c6e56424f94b71b91 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Mar 2013 14:18:40 +0100 Subject: [PATCH] Bug 8365: Followup Force DateTime type for the datedue variable Signed-off-by: Broust I tested one more time on a sandbox but I confirm the problem: the due date doesn't change when you renew more than one time with syspref renewalperiodbase turned on: "the old due date of the checkout". The due date should change any time. Signed-off-by: Katrin Fischer Added signed-off line and problem description from bugzilla. Signed-off-by: Jared Camins-Esakov --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 185575ef3c..08935e207b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2525,7 +2525,7 @@ sub AddRenewal { my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'}; $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? - $issuedata->{date_due} : + dt_from_string( $issuedata->{date_due} ) : DateTime->now( time_zone => C4::Context->tz()); $datedue = CalcDateDue($datedue, $itemtype, $issuedata->{'branchcode'}, $borrower, 'is a renewal'); } -- 2.39.5