3 /* load the script library */
4 load_lib('circ/circ_lib.js');
5 log_vars('circ_permit_patron');
9 if( isTrue(patron.barred) )
10 result.events.push('PATRON_BARRED');
13 /* ---------------------------------------------------------------------
14 Check the items out count
15 --------------------------------------------------------------------- */
16 var config = findGroupConfig(patronProfile);
19 var limit = config.maxItemsOut;
22 /* a renewal does not add to the itemsOut, so just make
23 sure they are not already over the items out limit */
24 if( isTrue(isRenewal) ) {
25 if( patronItemsOut > limit ) {
26 result.events.push('PATRON_EXCEEDS_CHECKOUT_COUNT');
29 if( patronItemsOut >= limit ) {
30 result.events.push('PATRON_EXCEEDS_CHECKOUT_COUNT');
36 log_warn("** profile has no configured information: " + patronProfile);