From 4612eeddf7889521f3ba73587beee45ac058ef82 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 5 Jul 2011 16:44:16 +0100 Subject: [PATCH] Bug 5549 : CalcFine was corrupting due date Clone the passed duedate as the addition of days was corrupting it in calling context causing new account recs to be written rather than updating the existing --- C4/Overdues.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index ae62b1e780..7676a87283 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -252,7 +252,8 @@ or "Final Notice". But CalcFine never defined any value. =cut sub CalcFine { - my ( $item, $bortype, $branchcode, $start_date, $end_date ) = @_; + my ( $item, $bortype, $branchcode, $due_dt, $end_date ) = @_; + my $start_date = $due_dt->clone(); my $dbh = C4::Context->dbh; my $amount = 0; my $charge_duration; -- 2.39.5