From: risard Date: Tue, 1 Sep 2009 19:18:13 +0000 (+0000) Subject: added algoma to circ_permit_copy.js X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=70684f7df80e2736c4a6a03bdb4cac51e2bd0820;p=contrib%2FConifer.git added algoma to circ_permit_copy.js git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@636 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/circ/circ_permit_copy.js b/circ/circ_permit_copy.js index 530adfa29c..f6ec2ae9be 100644 --- a/circ/circ_permit_copy.js +++ b/circ/circ_permit_copy.js @@ -8,7 +8,8 @@ log_vars('circ_permit_copy'); var lusys = ['LUSYS', 'CRC', 'HUNTINGTON', 'LDCR', 'MRC', 'OSUL', 'MEDIACEN', 'SUDBURY']; var hearstsys = ['HEARSTSYS', 'HEARST', 'KAP', 'TIMMINS']; var nosmsys = ['OSM', 'NOSME', 'NOSMW']; -var winsys = ['OWA', 'OWAL']; +var winsys = ['OWA', 'OWAL']; +var algsys = ['OSTMA']; /* looks silly but we do plan to add one or two branches during the winter term */ /* In theory, isOrgDescendent would work - but it isn't, for some reason */ if (patron.home_ou.id != copy.circ_lib.id) { @@ -111,6 +112,36 @@ if (copy.circ_lib.shortname == 'OWAL') { result.events.push('COPY_CIRC_NOT_ALLOWED'); // would prefer this to push a "Check Patron Profile" message } } // end permissions for Windsor Law + +/******************************* + PERMIT FOR ALGOMA +********************************/ + +if (copy.circ_lib.shortname == 'OSTMA') { + + if (isValidPatron(patronProfile)) { + + if (copy.location == 'ALGO-SHWK') || + (copy.location == 'ALGO-REF') || + (copy.location == 'ALGO-PER') || + (copy.location == 'ALGO-DOC') + { + result.events.push('COPY_CIRC_NOT_ALLOWED'); + } + } + + + if ( !(patronProfile == 'Faculty') && (copy.location == 'ALGO-AV') { + result.events.push('COPY_CIRC_NOT_ALLOWED'); + } + +} + + +/******************************* + END -- PERMIT FOR ALGOMA +********************************/ + if( ! isTrue(isRenewal) ) { if(copyStatus != 'Available' &&