]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/javascript/backend/circ/circ_permit_hold.js
added check for bestsellernh
[working/Evergreen.git] / Open-ILS / src / javascript / backend / circ / circ_permit_hold.js
1 function go() {
2
3 load_lib('circ/circ_lib.js');
4 log_vars('circ_permit_hold');
5
6 if( isTrue(patron.barred) ) 
7         result.events.push('PATRON_BARRED');
8
9 if( copy.circ_modifier == 'bestsellernh' )
10         result.events.push('ITEM_NOT_HOLDABLE');
11
12 /* projected medium 
13         this needs to be expanded to check circ_modifiers as well
14 */
15
16 if( getMARCItemType() == 'g' &&
17                 !isOrgDescendent(copy.circ_lib.shortname, patron.home_ou.id) )
18         result.events.push('CIRC_EXCEEDS_COPY_RANGE');
19
20 } go();
21