[Koha-patches] [PATCH] [SIGNED-OFF] 3341: Fines calculation erroneous when a repeatable holiday is added
Marcel de Rooy
M.de.Rooy at rijksmuseum.nl
Thu Feb 17 13:39:45 CET 2011
From: Frédérick Capovilla <frederick.capovilla at sys-tech.net>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
---
C4/Overdues.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/C4/Overdues.pm b/C4/Overdues.pm
index adba979..b5e3cdf 100644
--- a/C4/Overdues.pm
+++ b/C4/Overdues.pm
@@ -488,12 +488,12 @@ sub UpdateFine {
if ( my $data = $sth->fetchrow_hashref ) {
- # we're updating an existing fine. Only modify if we're adding to the charge.
+ # we're updating an existing fine. Only modify if amount changed
# Note that in the current implementation, you cannot pay against an accruing fine
# (i.e. , of accounttype 'FU'). Doing so will break accrual.
if ( $data->{'amount'} != $amount ) {
my $diff = $amount - $data->{'amount'};
- $diff = 0 if ( $data->{amount} > $amount);
+ #3341: diff could be positive or negative!
my $out = $data->{'amountoutstanding'} + $diff;
my $query = "
UPDATE accountlines
--
1.6.0.6
More information about the Koha-patches
mailing list