3 /* load the lib script */
4 load_lib('circ_lib.js');
6 /* collect some useful variables */
7 var copy = environment.copy;
8 var patron = environment.patron;
9 var patronProfile = patron.profile.name.toLowerCase();
10 var copyStatus = copy.status.name.toLowerCase();
11 var isRenewal = environment.isRenewal;
14 log_debug('circ_permit_copy: permit circ on ' +
16 ', Patron:' + patron.id +
17 ', Patron Username:' + patron.usrname +
18 ', Patron Library: ' + patron.home_ou.name +
19 ', Copy status: ' + copyStatus +
20 ', Copy location: ' + copy.location.name +
21 ', Is Renewal: ' + ( (isRenewal) ? "yes" : "no" ) +
26 if( ! isTrue(copy.circulate) )
27 result.events.push('COPY_CIRC_NOT_ALLOWED');
29 if( isTrue(copy.ref) )
30 result.events.push('COPY_IS_REFERENCE');
34 if(copyStatus != 'available' &&
35 copyStatus != 'on holds shelf' && copyStatus != 'reshelving' ) {
36 result.events.push('COPY_NOT_AVAILABLE');