From ea6b238a86bd61e27c6eafae383b6fe163d0e663 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Mar 2013 14:18:40 +0100 Subject: [PATCH] [PASSED QA] 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. --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 300da1c..4a60843 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2515,7 +2515,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'); } -- 1.7.9.5