fixed max-items-out settings for many non-patron groups to match the patron settings...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Oct 2006 19:04:57 +0000 (19:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Oct 2006 19:04:57 +0000 (19:04 +0000)
renewals are now allowed without question if the patron has too many items out or too many overdues,
renewals are still stopped on excessive fines

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6422 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/javascript/backend/circ/circ_groups.js
Open-ILS/src/javascript/backend/circ/circ_permit_patron.js
Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index daa3fca..fdfdf24 100644 (file)
@@ -28,21 +28,21 @@ var GROUP_CONFIG = {
        },
 
        'Friend'        : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : -1
        },
 
        'NonResident' : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : -1
        },
 
        'OutOfState' : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : -1
@@ -71,21 +71,21 @@ var GROUP_CONFIG = {
        },
 
        'TempRes6' : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : -1
        },
 
        'tempRes12' : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : -1
        },
 
        'Trustee' : {
-               maxItemsOut                     : 10,
+               maxItemsOut                     : 50,
                fineThreshold           : 10,
                overdueThreshold        : 10,
                maxHolds                                : 10
index 989f32e..80f790d 100644 (file)
@@ -18,17 +18,11 @@ if( config ) {
        
        var limit = config.maxItemsOut;
        if( limit >= 0 ) {
-
-               /* a renewal does not add to the itemsOut, so just make
-                       sure they are not already over the items out limit */
-               if( isTrue(isRenewal) ) {
-                       if( patronItemsOut > limit ) {
-                               result.events.push('PATRON_EXCEEDS_CHECKOUT_COUNT');
-                       }
-               } else {
-                       if( patronItemsOut >= limit ) {
+               /* Patrons are allowed to renew regardless 
+                       of how many items they have checked out */
+               _debug('patron items out = ' + patronItemsOut +' limit = ' + limit);
+               if( !isTrue(isRenewal) && patronItemsOut >= limit ) {
                                result.events.push('PATRON_EXCEEDS_CHECKOUT_COUNT');
-                       }
                }
        }
 
index d64f9b8..a5975e5 100644 (file)
@@ -643,7 +643,17 @@ sub run_patron_permit_scripts {
        my @allevents; 
 
        my $penalties = $self->gather_penalty_request();
-       push( @allevents, OpenILS::Event->new($_)) for (@$penalties, @$patron_events);
+
+       for my $p (@$penalties, @$patron_events) {
+
+               # this is policy directly in the code, not a good idea in general, but
+               # the penalty server doesn't know anything about renewals, so we
+               # have to strip the event out here
+               next if $self->is_renewal and $p eq 'PATRON_EXCEEDS_OVERDUE_COUNT';
+
+
+               push( @allevents, OpenILS::Event->new($p))
+       }
 
        $logger->info("circulator: permit_patron script returned events: @allevents") if @allevents;