circulation template scripts
[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
42         PATRON_STANDING                 = 10;
43         PATRON_FINE                                     = 11;
44         PATRON_CHECKOUT_COUNT   = 12;
45
46         LOW                                                     = 1;
47         NORMAL                                          = 2;
48         HIGH                                                    = 3;
49
50         SHORT                                                   = 1;
51         NORMAL                                          = 2; 
52         EXTENDED                                                = 3;
53
54
55
56         # ------------------------------------------------------------------
57         # Run the rules files
58         # ------------------------------------------------------------------
59         PROCESS "$run_block"
60                 patron                  = circ_objects.patron 
61                 copy                            = circ_objects.copy
62                 circlib                 = circ_objects.copy.circlib() 
63                 title                           = circ_objects.title
64                 standings               = circ_objects.standings;
65                 patron_copies   = circ_objects.patron_copies;
66                 patron_fines    = circ_objects.patron_fines;
67
68 %]
69
70