[Koha-patches] [PATCH] Fix for Bug 3666, Overriding renewal limit means negative count in OPAC
Owen Leonard
oleonard at myacpl.org
Fri May 7 19:31:37 CEST 2010
Setting "renewalsleft" variable to zero if it comes out negative.
---
C4/Circulation.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index bceee8b..395494f 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 );
}
--
1.7.0.4
More information about the Koha-patches
mailing list