]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/circ_rules/dr_script.ttk
fixed image copying
[Evergreen.git] / Evergreen / circ_rules / dr_script.ttk
1 [%
2
3 # ------------------------------------------------------------------
4 # Circ Matrix
5 #
6 # Objects:
7 #       patron
8 #       copy
9 #               loan_duration
10 #       circlib
11 #               shortname
12 #
13 # Constants:
14 #       copy_types.*
15 #       
16 # ------------------------------------------------------------------
17
18 # ------------------------------------------------------------------
19 # Macros for simpler syntax
20
21 MACRO jump(n) PROCESS $n;
22 MACRO policy(p)  PROCESS policy_block val=p;
23 BLOCK policy_block; val; STOP; END; 
24
25 # ------------------------------------------------------------------
26
27
28
29 IF circlib.shortname == 'ARL-ATH'; jump('ARL_ATH'); END;
30 policy('pines_global_duration_policy_default'); 
31
32
33 BLOCK ARL_ATH;
34         IF copy.type == copy_types.book AND copy.loan_duration == 1; policy('my_ath_policy'); END;
35         IF copy.type == copy_types.audio AND copy.loan_duration == 2; policy('my_other_ath_policy'); END;
36 END;
37         
38
39 BLOCK BTRL;
40         IF copy.type == copy_types.dvd; policy('my_btrl_audio_policy'); END;
41 END;
42
43
44
45 %]