BMNVI - go-live - initial addition of circ script
authorPeter Michael Plett <pplett@sitka.bclibraries.ca>
Tue, 1 May 2012 03:06:35 +0000 (20:06 -0700)
committerPeter Michael Plett <pplett@sitka.bclibraries.ca>
Tue, 1 May 2012 03:06:35 +0000 (20:06 -0700)
circ/config_BMNVI.js [new file with mode: 0644]

diff --git a/circ/config_BMNVI.js b/circ/config_BMNVI.js
new file mode 100644 (file)
index 0000000..5372b88
--- /dev/null
@@ -0,0 +1,80 @@
+/** Policies for BMNVI **/
+
+function getPolicy() {
+
+    load_lib('circ/circ_lib.js');
+    log_info("Loading policy info for BMNVI");
+    var circMod = copy.circ_modifier ? copy.circ_modifier.toLowerCase() : '';
+
+    return {
+
+       getHardDueDate: function() { 
+       // await word from Jennifer re: this if needed
+           return ;
+       },
+
+       getLoanDuration: function() {
+            if (isPrecat || copy.call_number == -1) {
+                return '21_3';
+            }
+           
+           if (patronProfile == 'Post-Sec ILL') {
+                if (circMod == 'videos') { return '10_3'; } else { return '35_35_35_3'; }
+            }
+
+           var map = {
+                'videos': '7_3',
+                'dvd': '7_3',
+                'periodical': '7_3',
+                'magazine': '7_3',             // just in case NVIT begin separating their periodicals further (reading room mats, ie.)
+                'library-equipment': '3hr_1',
+               'circ-reserve-2-hour': '2hr_0', // course RESERVEs
+               'circ-reserve-24-hour': '1_1',
+                'inter-library-loan': '35_35_35_3' // these circmods ought to never come up, unless explicitly set. keep here for that eventuality (basic ILL)
+            };
+
+            return map[circMod] || '21_3';
+        },
+
+        getRecurringFine: function() {
+
+           if (patronProfile == 'Post-Sec ILL') { return 'zero'; }
+           if (isGroupDescendant('Library Staff',patronProfile)) { return 'zero'; }
+           if (isGroupDescendant('Institution Staff',patronProfile)) { return 'zero'; }
+
+           return 'twentycent';
+        },
+
+       getMaxFine: function() {
+           if (patronProfile == 'Post-Sec ILL') { return 'zero'; }
+           if (isGroupDescendant('Library Staff',patronProfile)) { return 'zero'; }
+           if (isGroupDescendant('Institution Staff',patronProfile)) { return 'zero'; }
+
+          return 'tendollar';
+        },
+
+       exceedsMaxCheckoutsByCircMod: function() {
+               return false;
+        },
+
+        isAllowedCirc: function() {
+                return true;
+        },
+        
+        isAllowedHold: function() {
+               if (copyStatus == 'Available') { return false; } else { return true; } 
+        },
+
+       getMaxHolds: function() {
+               var maxHoldsValue;
+               if (isGroupDescendant('Institution Staff',patronProfile)) { return 20; }
+               switch (patronProfile) {
+                       case 'Students': maxHoldsValue = 5; break;
+                       case 'Post-Sec ILL': maxHoldsValue = 5; break;
+                       case 'Community Borrowers': maxHoldsValue = 0; break;
+                       default: maxHoldsValue = 5;     // for lack of a better value, choose the minimum for most users
+               }
+               return maxHoldsValue;
+        }
+   };
+}