From ec5565d3564bfa1050549b51669b66ab55118e53 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Wed, 2 Sep 2009 14:14:59 -0600 Subject: [PATCH] include grace period when calculating overdue fine Before the grace period was not included in the number of days overdue when calculating the fine. My librarians seem to think the number of days overdue should include the grace period. Fine is not assessed before the grace period is up though. Signed-off-by: Galen Charlton --- C4/Overdues.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 6b429c5794..8f40e8bdb6 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -263,7 +263,7 @@ sub CalcFine { # correct for grace period. my $days_minus_grace = $daystocharge - $data->{'firstremind'}; if ($data->{'chargeperiod'} > 0 && $days_minus_grace > 0 ) { - $amount = int($days_minus_grace / $data->{'chargeperiod'}) * $data->{'fine'}; + $amount = int($daystocharge / $data->{'chargeperiod'}) * $data->{'fine'}; } else { # a zero (or null) chargeperiod means no charge. } -- 2.39.5