[open-ils-commits] r630 - conifer/trunk/circ (pzed)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 20 17:06:04 EDT 2009
Author: pzed
Date: 2009-08-20 17:05:58 -0400 (Thu, 20 Aug 2009)
New Revision: 630
Modified:
conifer/trunk/circ/circ_duration_OWAL.js
Log:
OWAL rules should be working, but cannot test properly until permissions problem is sorted out (cf ticket 132)
Modified: conifer/trunk/circ/circ_duration_OWAL.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWAL.js 2009-08-20 17:29:04 UTC (rev 629)
+++ conifer/trunk/circ/circ_duration_OWAL.js 2009-08-20 21:05:58 UTC (rev 630)
@@ -28,49 +28,51 @@
if (isValidPatron(patronProfile)) {
var temp_array = patronProfile.split(" ");
var profileFirst = temp_array[0];
-
- switch(copy.circ_modifier) {
- case 'LAW MONO':
- if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
- // do nothing
- } else {
+
+ if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ // use override value - Non-Law Readers can borrow nothing
+ } else if (patronProfile == 'Readers' && copy.circ_modifier == 'LAW_MONO') {
+ result.durationRule = 'OWAL_' + profileFirst; // Law Readers can only borrow LAW_MONO items
+ } else {
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
result.durationRule = 'OWAL_' + profileFirst;
- }
- break;
- case 'LAW NOCIRC':
- // Faculty exception handled below
- break;
- case 'LAW RES1D':
- result.durationRule = 'OWAL_rsv_oneday';
- result.recurringFinesRule = 'OWAL_hourly';
- break;
- case 'LAW RES3D':
- result.durationRule = 'OWAL_rsv_threeday';
- result.recurringFinesRule = 'OWAL_hourly';
- break;
- case 'LAW RES3H':
- result.durationRule = 'OWAL_rsv_threehour';
- result.recurringFinesRule = 'OWAL_hourly';
- break;
- case 'LAW RES5H':
- result.durationRule = 'OWAL_rsv_fivehour';
- result.recurringFinesRule = 'OWAL_hourly';
- break;
- case 'LAW SERIAL':
- // Faculty exception handled below
- break;
+ break;
+ case 'LAW NOCIRC':
+ // use override value
+ break;
+ case 'LAW RES1D':
+ result.durationRule = 'OWAL_rsv_oneday';
+ result.recurringFinesRule = 'OWAL_hourly';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = 'OWAL_rsv_threeday';
+ result.recurringFinesRule = 'OWAL_hourly';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = 'OWAL_rsv_threehour';
+ result.recurringFinesRule = 'OWAL_hourly';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = 'OWAL_rsv_fivehour';
+ result.recurringFinesRule = 'OWAL_hourly';
+ break;
+ case 'LAW SERIAL':
+ // Faculty exceptions handled below
+ break;
+ }
}
-
- //exceptions for Law Faculty
- if (patron.home_ou.shortname == "OWAL" && patronProfile == "Faculty") {
- result.recurringFines.Rule = 'free';
- if (copy.circ_modifier == 'LAW NOCIRC') {
- result.durationRule = 'OWAL_faculty_nocirc';
- } else if (copy.circ_modifier == 'LAW SERIAL') {
- result.durationRule = 'OWAL_faculty_serials';
- } else if (copy.circ_modifier.slice(0, 6) == 'LAW RES') {
- result.durationRule = 'OWAL_rsv_threeday';
+ //exceptions for Faculty
+ if (patronProfile == "Faculty") {
+ if (copy.circ_modifier == 'LAW SERIAL') {
+ result.durationRule = 'OWAL_Faculty_serials'; // all Faculty can borrow serials
}
+ if (patron.home_ou.shortname == 'OWAL') {
+ result.recurringFinesRule = 'free'; // Law Faculty pay no fines
+ if (copy.circ_modifier.slice(0, 6) == 'LAW RES') {
+ result.durationRule = 'OWAL_rsv_threeday'; // Law Faculty get all reserve items for three days
+ }
+ }
}
}
log_info("circ0814 - results: " + result.durationRule);
More information about the open-ils-commits
mailing list