basic duration/renewal script
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Mar 2005 15:37:59 +0000 (15:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Mar 2005 15:37:59 +0000 (15:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@395 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/circ_rules/dr_script.ttk [new file with mode: 0644]

diff --git a/Evergreen/circ_rules/dr_script.ttk b/Evergreen/circ_rules/dr_script.ttk
new file mode 100644 (file)
index 0000000..b388460
--- /dev/null
@@ -0,0 +1,45 @@
+[%
+
+# ------------------------------------------------------------------
+# Circ Matrix
+#
+# Objects:
+#      patron
+#      copy
+#              loan_duration
+#      circlib
+#              shortname
+#
+# Constants:
+#      copy_types.*
+#      
+# ------------------------------------------------------------------
+
+# ------------------------------------------------------------------
+# Macros for simpler syntax
+
+MACRO jump(n) PROCESS $n;
+MACRO policy(p)  PROCESS policy_block val=p;
+BLOCK policy_block; val; STOP; END; 
+
+# ------------------------------------------------------------------
+
+
+
+IF circlib.shortname == 'ARL-ATH'; jump('ARL_ATH'); END;
+policy('pines_global_duration_policy_default'); 
+
+
+BLOCK ARL_ATH;
+       IF copy.type == copy_types.book AND copy.loan_duration == 1; policy('my_ath_policy'); END;
+       IF copy.type == copy_types.audio AND copy.loan_duration == 2; policy('my_other_ath_policy'); END;
+END;
+       
+
+BLOCK BTRL;
+       IF copy.type == copy_types.dvd; policy('my_btrl_audio_policy'); END;
+END;
+
+
+
+%]