removed a bogus special case for STATELIB circ durations
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 26 Oct 2006 16:39:17 +0000 (16:39 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 26 Oct 2006 16:39:17 +0000 (16:39 +0000)
Added a special case for STATELIB "AV" items so that they could be holdable by anyone

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6519 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/javascript/backend/circ/circ_duration.js
Open-ILS/src/javascript/backend/circ/circ_item_config.js
Open-ILS/src/javascript/backend/circ/circ_permit_hold.js

index c6948dc..2d9a8fa 100644 (file)
@@ -45,20 +45,9 @@ if( config ) {
        ----------------------------------------------------------------------------- */
 
 /* statelib has some special circ rules */
-
 if( isOrgDescendent('STATELIB', copy.circ_lib.id) ) {
-
-       result.durationRule                     = '35_days_1_renew';
-       result.recurringFinesRule       = "10_cent_per_day";
-       result.maxFine                                  = "overdue_mid";
-
-       /* reference, microfiche, microfilm */
-       if(     isTrue(copy.ref)        || 
-                       itemForm == 'a' || 
-                       itemForm == 'b' ) {
-
-               result.durationRule             = '14_days_2_renew';
-       }       
+       if(isTrue(copy.ref))
+               result.durationRule     = '14_days_2_renew';
 }
 
 
index 7d1aa44..959af74 100644 (file)
@@ -383,6 +383,9 @@ CIRC_MOD_MAP['STATE-MFRM'] =  {
        maxFine                                 : "overdue_mid"
 };
 
+
+
+
 /* this will set defaults even if no one asked for them */
 log_debug("Calling getItemConfig() to force defaults..");
 getItemConfig();
index a8c447e..8aa54bc 100644 (file)
@@ -20,14 +20,25 @@ var mod = (copy.circ_modifier) ? copy.circ_modifier.toLowerCase() : "";
 
 log_info("circ-modifier = "+mod);
 
-
 if( mod == 'bestsellernh' )
        result.events.push('ITEM_NOT_HOLDABLE');
 
 var marcItemType = getMARCItemType();
 
-var isAnc;
 
+/* some STATELIB items can have holds placed on them from anywhere */
+if( isOrgDescendent('STATELIB', copy.circ_lib.id) ) {
+       if(     mod == 'dvd-long'               || 
+                       mod == 'video-long'     || 
+                       mod == 'audiobook'      || 
+                       mod == 'microform' ) {
+               log_info("STATELIB 'AV' item is holdable");
+               return;
+       }
+}
+
+
+var isAnc;
 if( ( marcItemType == 'g' || 
                marcItemType == 'i' || 
                marcItemType == 'j' ||