Go with a group-based approach to fine and overdue thresholds
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 3 Jul 2009 18:46:54 +0000 (18:46 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 3 Jul 2009 18:46:54 +0000 (18:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@564 6d9bc8c9-1ec2-4278-b937-99fde70a366f

circ/circ_permit_patron.js

index 8bb1365..43fcb7f 100755 (executable)
@@ -21,11 +21,13 @@ if( config ) {
         }
     }
 
-    if (patronFines > 0 && patron.home_ou == 103) {
+    limit = config.fineThreshold;
+    if (patronFines >= limit) {
         result.events.push('PATRON_EXCEEDS_FINES');
     }
 
-    if (patronOverdueCount > 0 && patron.home_ou == 103) {
+    limit = config.overdueThreshold;
+    if (patronOverdueCount >= limit) {
         result.events.push('PATRON_EXCEEDS_OVERDUE_COUNT');
     }