From b4a4706655cb605eebb577c6350b1d864c2707d4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 14 Jul 2023 07:36:47 -0400 Subject: [PATCH] Bug 34279: Don't enforce overduefinescap unless it is greater than 0 --- C4/Overdues.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 8074411a9a..41674a468a 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -282,7 +282,10 @@ sub CalcFine { } } # else { # a zero (or null) chargeperiod or negative units_minus_grace value means no charge. } - $amount = $issuing_rule->{overduefinescap} if $issuing_rule->{overduefinescap} && $amount > $issuing_rule->{overduefinescap}; + $amount = $issuing_rule->{overduefinescap} + if $issuing_rule->{overduefinescap} + && $issuing_rule->{overduefinescap} > 0 + && $amount > $issuing_rule->{overduefinescap}; # This must be moved to Koha::Item (see also similar code in C4::Accounts::chargelostitem $item->{replacementprice} ||= $itemtype->defaultreplacecost -- 2.30.2