circ scripts
[Evergreen.git] / Evergreen / circ_rules / permit_circ.rules
1 [%
2
3 # ------------------------------------------------------------------
4 # Permissibility script.  
5 # ------------------------------------------------------------------
6
7
8 # ------------------------------------------------------------------
9 # Patron checks
10 # ------------------------------------------------------------------
11
12 IF patron.standing != "Good";
13         ret(PATRON_STANDING, "Patron not in good standing: ${patron.standing}"); END;
14
15
16 # ------------------------------------------------------------------
17 # Copy checks
18 # ------------------------------------------------------------------
19
20 IF ! copy.circulate;    
21         ret(COPY_NOCIRC, "Copy is not allowed to circulate"); END; 
22
23 IF copy.status != "Available";         
24         ret(COPY_UNAVAIL, "Copy is unavailable: ${copy.status}"); END;
25
26 IF !copy.location.circulate;            
27         ret(COPY_LOCATION, "Copy location not allowed to curculate"); END;
28
29 IF copy.ref; 
30         ret(COPY_ISREF, "Copy is reference material"); END;
31
32
33
34
35
36
37 ret(OK,"Allowed");
38
39 %]