rt12774 mlb pl_extended change
authorMark Bucholtz <mark@coconut.sitka.bclibraries.ca.sitka.bclibraries.ca>
Mon, 11 Jun 2012 13:03:13 +0000 (06:03 -0700)
committerMark Bucholtz <mark@coconut.sitka.bclibraries.ca.sitka.bclibraries.ca>
Mon, 11 Jun 2012 13:03:13 +0000 (06:03 -0700)
circ/config_BSQ.js

index dd388be..de5e465 100644 (file)
@@ -17,28 +17,39 @@ getLoanDuration: function() {
             if (isPrecat || copy.call_number == -1) {
                 return '21_0';
             }
-           if (patronProfile == 'PL Temporary'){
-               return '21_0';
+           if (patronProfile == 'PL Temporary')
+           {
+               var pltempmap = {
+                '7-day-loan': '7_0',
+                'video': '7_0',
+                'dvd': '7_0',
+                'juvenile-video': '7_0',
+                'video-cassette': '7_0',
+                'juvenile-audio-visual': '7_0',
+                'restricted-video': '7_0',
+                'restricted-dvd': '7_0',
+                'oversize': '90_0',
+                'inter-library-loan': '21_0'
+               };
+               return pltempmap[circMod] ||  '21_0';
            }
-
-            /* returns config.rule_circ_duration.name */
-
-            var map = {
-             '7-day-loan': '7_0',
-             'video': '7_2',
-             'dvd': '7_2',
-             'juvenile-video': '7_2',
-             'video-cassette': '7_2',
-             'juvenile-audio-visual': '7_2',
-             'restricted-video': '7_2',
-             'restricted-dvd': '7_2',
-             'oversize': '90_0',
-             'inter-library-loan': '21_0'
-            };
-
-            return map[circMod] ||  '21_2';
-
-        },
+            else
+           {
+               var map = {
+                '7-day-loan': '7_0',
+                'video': '7_2',
+                'dvd': '7_2',
+                'juvenile-video': '7_2',
+                'video-cassette': '7_2',
+                'juvenile-audio-visual': '7_2',
+                'restricted-video': '7_2',
+                'restricted-dvd': '7_2',
+                'oversize': '90_0',
+                'inter-library-loan': '21_0'
+               };
+               return map[circMod] ||  '21_2';
+           }
+},
 
        getRecurringFine : function() {
            var circMod = copy.circ_modifier ? copy.circ_modifier.toLowerCase() : '';