]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/circ_rules/permit_circ.rules
first cut, bill wizard
[Evergreen.git] / Evergreen / circ_rules / permit_circ.rules
1 [%
2
3 # ------------------------------------------------------------------
4 # Permissibility script.  
5 # ------------------------------------------------------------------
6
7
8
9 # ------------------------------------------------------------------
10 # Patron checks
11 # ------------------------------------------------------------------
12
13 IF patron.standing != "Good";
14         ret(PATRON_STANDING, "Patron not in good standing: ${patron.standing}"); END;
15
16 IF patron.profile == "Staff" && patron_copies > 50;
17         ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
18
19 IF patron.profile == "Patrons" && patron_copies > 10;
20         ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
21
22 IF patron.profile == "Users" && patron_copies > 5;
23         ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
24
25
26 # ------------------------------------------------------------------
27 # Copy checks
28 # ------------------------------------------------------------------
29
30 IF ! copy.circulate;    
31         ret(COPY_NOCIRC, "Copy is not allowed to circulate"); END; 
32
33 IF copy.status != "Available" && copy.status != "On holds shelf";
34         ret(COPY_UNAVAIL, "Copy is unavailable: ${copy.status}"); END;
35
36 IF !copy.location.circulate;            
37         ret(COPY_LOCATION, "Copy location not allowed to curculate"); END;
38
39 IF copy.ref; 
40         ret(COPY_ISREF, "Copy is reference material"); END;
41
42
43
44
45 ret(OK,"Allowed");
46
47 %]