From 61fbe7976d4fa765eb492bd77ef133a58b732478 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 9 Oct 2006 19:04:57 +0000 Subject: [PATCH] fixed max-items-out settings for many non-patron groups to match the patron settings of 50 items 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 --- .../src/javascript/backend/circ/circ_groups.js | 12 ++++++------ .../javascript/backend/circ/circ_permit_patron.js | 14 ++++---------- .../perlmods/OpenILS/Application/Circ/Circulate.pm | 12 +++++++++++- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Open-ILS/src/javascript/backend/circ/circ_groups.js b/Open-ILS/src/javascript/backend/circ/circ_groups.js index daa3fca577..fdfdf24de6 100644 --- a/Open-ILS/src/javascript/backend/circ/circ_groups.js +++ b/Open-ILS/src/javascript/backend/circ/circ_groups.js @@ -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 diff --git a/Open-ILS/src/javascript/backend/circ/circ_permit_patron.js b/Open-ILS/src/javascript/backend/circ/circ_permit_patron.js index 989f32e5f9..80f790da9a 100644 --- a/Open-ILS/src/javascript/backend/circ/circ_permit_patron.js +++ b/Open-ILS/src/javascript/backend/circ/circ_permit_patron.js @@ -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'); - } } } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index d64f9b82ed..a5975e5592 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -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; -- 2.43.2