]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/circ_rules/circ_main.rules
Let the onslaught continue...
[Evergreen.git] / Evergreen / circ_rules / circ_main.rules
1 [%
2
3
4         # ------------------------------------------------------------------
5         # Macros for simpler syntax
6         # ------------------------------------------------------------------
7         MACRO jump(n)           PROCESS "$n";
8 #       MACRO policy(p) PROCESS policy_block val=p;
9 #       BLOCK policy_block; val; STOP; END; 
10
11         MACRO ret(status,text) PROCESS ret_block s=status t=text;
12
13         BLOCK ret_block;
14                 result.0 = s;
15                 result.1 = t;
16                 "Circ Template Result: "; result.0; " "; result.1; 
17                 STOP;
18         END;
19
20
21         # ------------------------------------------------------------------
22         # These are passed in to every script
23         # ------------------------------------------------------------------
24         #       Objects         : Methods  
25         # -------------------
26         #       patron          :
27         #       copy                    : 
28         #       circlib         : 
29         #       standings       : 
30         #       title                   :
31         # ------------------------------------------------------------------
32
33         # ------------------------------------------------------------------
34         # Constants
35         # ------------------------------------------------------------------
36         OK                                                              = 0;
37         COPY_ISREF                                      = 2;
38         COPY_NOCIRC                                     = 3;
39         COPY_UNAVAIL                            = 4;
40         COPY_LOCATION                           = 5;
41         NO_COPY                                         = 100; # used by container code
42
43         PATRON_STANDING                 = 10;
44         PATRON_FINE                                     = 11;
45         PATRON_CHECKOUT_COUNT   = 12;
46
47         LOW                                                     = 1;
48         NORMAL                                          = 2;
49         HIGH                                                    = 3;
50
51         SHORT                                                   = 1;
52         NORMAL                                          = 2; 
53         EXTENDED                                                = 3;
54
55
56
57         # ------------------------------------------------------------------
58         # Run the rules files
59         # ------------------------------------------------------------------
60         PROCESS "$run_block"
61                 patron                  = circ_objects.patron 
62                 copy                            = circ_objects.copy
63                 circlib                 = circ_objects.copy.circlib() 
64                 title                           = circ_objects.title
65                 standings               = circ_objects.standings;
66                 patron_copies   = circ_objects.patron_copies;
67                 patron_fines    = circ_objects.patron_fines;
68
69 %]
70
71