Prevent REFERENCE and DEPOSIT (government document) items from circulating, just...
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 11 Jun 2009 21:04:30 +0000 (21:04 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 11 Jun 2009 21:04:30 +0000 (21:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@526 6d9bc8c9-1ec2-4278-b937-99fde70a366f

circ/circ_permit_copy.js

index 6b95ccc..8eac0e6 100644 (file)
@@ -38,8 +38,13 @@ if (patron.home_ou.id != copy.circ_lib.id) {
         }
 }
 
-if( ! isTrue(copy.circulate) || !isTrue(copy.location.circulate) ) 
+if( ! isTrue(copy.circulate) || 
+       !isTrue(copy.location.circulate) ||
+       (copy.circ_lib.shortname == 'OSUL' && copy.circ_modifier == 'DEPOSIT') ||
+       (copy.circ_lib.shortname == 'OSUL' && copy.circ_modifier == 'REFERENCE')
+) {
        result.events.push('COPY_CIRC_NOT_ALLOWED');
+}
 
 
 if( ! isTrue(isRenewal) ) {