]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/javascript/backend/circ/circ_permit_hold.js
moved script building to a generic framework using cstore as the base - standardizing...
[working/Evergreen.git] / Open-ILS / src / javascript / backend / circ / circ_permit_hold.js
1 function go() {
2
3 var patron                              = environment.patron;
4 var title                               = environment.title;
5 var copy                                        = environment.copy;
6 var volume                              = environment.volume;
7 var title                               = environment.title;
8 var requestor                   = environment.requestor;
9 var requestLib                  = environment.requestLib;
10 var titleDescriptor     = environment.titleDescriptor;
11
12 log_debug('circ_permit_hold: permit circ on ' +
13         ' Copy: '                                       + copy.id + 
14         ', Patron:'                                     + patron.id +
15         ', Patron Username:'            + patron.usrname +
16         ', Patron Library: '            + patron.home_ou.name +
17         ', Copy location: '             + copy.location.name +
18         ', Item Type: '                 + titleDescriptor.item_type +
19         ', Item Form: '                 + titleDescriptor.item_form +
20         ', Item Lang: '                 + titleDescriptor.item_lang +
21         ', Item Audience: '             + titleDescriptor.audience +
22         '');
23
24
25
26
27
28 if( titleDescriptor.item_type == 'g'  /* projected medium */
29         && copy.circ_lib != patron.home_ou.id )
30         return result.event = 'CIRC_EXCEEDS_COPY_RANGE';
31
32
33 return result.event = 'SUCCESS';
34
35
36 } go();
37