added some hold permit exemptions for DCPL and LEE. this is a PINES thing
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jan 2008 18:21:08 +0000 (18:21 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jan 2008 18:21:08 +0000 (18:21 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8526 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/src/javascript/backend/circ/circ_permit_hold.js

index 80b36b8..b2b22ed 100644 (file)
@@ -70,6 +70,26 @@ if( ( marcItemType == 'g' ||
 
        log_info("this is a range-protected item...");
 
+       /* ------------------------------------------------------------------------ */
+       /** This patch allows DCPL and LEE patrons to place 
+               holds on protected items accross their systems.  In short, if the pickup lib,
+               owning lib, and patron home (or request lib) are all within either of the two 
+               systems, allow the hold */
+       if(
+               /* DCPL=33, LEE=115 */
+               (hasCommonAncestor(holdPickupLib, 33, 1) || hasCommonAncestor(holdPickupLib, 115, 1)) &&
+               (hasCommonAncestor(volume.owning_lib, 33, 1) || hasCommonAncestor(volume.owning_lib, 115, 1)) &&
+               (
+                       hasCommonAncestor(patron.home_ou.id, 33, 1) || hasCommonAncestor(patron.home_ou.id, 115, 1) || 
+                       hasCommonAncestor(holdRequestLib.id, 33, 1) || hasCommonAncestor(holdRequestLib.id, 115, 1)
+               )) {
+
+               log_info("DCPL and LEE are allowed to place holds on protected items accross the two systems");
+               return;
+       }
+       /* ------------------------------------------------------------------------ */
+
+
     if( ! hasCommonAncestor( volume.owning_lib, holdPickupLib, 1 ) ) {
 
         /* we don't want these items to transit to the pickup lib */