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
},
'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
},
'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
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');
- }
}
}
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;