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

_______________________________________________
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to