Add Boreal circulation rules
authorDan Scott <dan@coffeecode.net>
Thu, 21 Jul 2011 19:08:53 +0000 (15:08 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 31 Jul 2012 17:24:12 +0000 (13:24 -0400)
Still need to add their limits based on user profile & item type

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js [new file with mode: 0644]

diff --git a/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js b/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js
new file mode 100644 (file)
index 0000000..b1062cf
--- /dev/null
@@ -0,0 +1,41 @@
+/* grab the config from the config script */
+var config = getItemConfig();
+var itemForm    = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : "";
+
+/* Set the defaults for books for most patron types */
+result.durationRule = '21_days_1_renew';
+result.recurringFinesRule = '25_cent_per_day';
+result.maxFine = '10_dollars';
+
+if (copy.circ_modifier == 'AUDIO') {
+    result.durationRule = '7_days_1_renew';
+    result.recurringFinesRule = '1_dollar_per_day';
+}
+
+if (copy.circ_modifier == 'AV_EQUIP') {
+    result.durationRule = '1_day_1_renew';
+    result.recurringFinesRule = '1_dollar_per_day';
+}
+
+if (copy.circ_modifier == 'CD MUSIC') {
+    result.durationRule = '7_days_1_renew';
+}
+
+if (copy.circ_modifier == 'CIRC SHORT') {
+    result.durationRule = '1_day_1_renew';
+}
+
+if (copy.circ_modifier == 'DVD VIDEO') {
+    result.durationRule = '7_days_1_renew';
+    result.recurringFinesRule = '1_dollar_per_day';
+}
+
+if (copy.circ_modifier == 'SOFTWARE') {
+    result.durationRule = '7_days_1_renew';
+    result.recurringFinesRule = '1_dollar_per_day';
+}
+
+if (copy.circ_modifier == 'DVD VIDEO') {
+    result.durationRule = '7_days_1_renew';
+    result.recurringFinesRule = '1_dollar_per_day';
+}