Fixed OSTMA circ duration.
authorrisard <risard@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 2 Sep 2009 18:23:40 +0000 (18:23 +0000)
committerrisard <risard@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 2 Sep 2009 18:23:40 +0000 (18:23 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@639 6d9bc8c9-1ec2-4278-b937-99fde70a366f

circ/circ_duration_OSTMA.js

index 7e35bee..800684e 100644 (file)
@@ -1,3 +1,10 @@
+var currentTime = new Date();
+var debugStamp = "circ_duraction_test" + (currentTime.getMonth() + 1) + "" +
+        "" + currentTime.getDate() + "" + currentTime.getFullYear() +
+        ": ";
+
+log_info(debugStamp + "here for OSTMA");
+
 /* grab the config from the config script */
 var config = getItemConfig();
 var itemForm    = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : "";
@@ -18,7 +25,14 @@ if (patronProfile == 'Faculty'){
 /*Set exceptions for other materials*/
 
 /* AV MATERIALS */
-if (copy.circ_modifier == 'AUDIO' || 'VIDEO' || 'DVD VIDEO' && patronProfile == 'Faculty'){
+if (copy.circ_modifier == 'AUDIO' ||
+    copy.circ_modifier == 'VIDEO' ||
+    copy.circ_modifer == 'DVD VIDEO' ||
+    copy.location.name == 'ALGO-AV' &&
+    patronProfile == 'Faculty'
+    
+   ){
+
        result.durationRule = '14_days_0_renew';                                        
        result.recurringFinesRule = '2_dollars_per_day';
        result.maxFine = '25_dollars';  
@@ -33,10 +47,10 @@ res_hour_match = res_hour_re.exec(copy.circ_modifier);
 if (res_day_match) {
        result.durationRule = res_day_match[1] + '_days_0_renew';
        result.recurringFinesRule = '2_dollars_per_day';
-       result.maxFine = '15_dollars;
+       result.maxFine = '15_dollars';
 } else if (res_hour_match) {
        result.durationRule = res_hour_match[1] + '_hours_0_renew';
-       result.recurringFinesRule = '50_cents_per_hour';
+       result.recurringFinesRule = '50_cent_per_hour';
        result.maxFine = '15_dollars';
 }