From 7c826bc8164d3864e6537f246edd521a7c80d187 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 7 May 2010 13:31:37 -0400 Subject: [PATCH] Fix for Bug 3666, Overriding renewal limit means negative count in OPAC Setting "renewalsleft" variable to zero if it comes out negative. Signed-off-by: Galen Charlton --- C4/Circulation.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index bceee8ba30..395494fb32 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2242,6 +2242,7 @@ sub GetRenewCount { $renewsallowed = $issuingrule->{'renewalsallowed'}; $renewsleft = $renewsallowed - $renewcount; + if($renewsleft < 0){ $renewsleft = 0; } return ( $renewcount, $renewsallowed, $renewsleft ); } -- 2.39.5