[open-ils-commits] r574 - conifer/trunk/circ (pzed)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 9 10:30:54 EDT 2009
Author: pzed
Date: 2009-07-09 10:30:53 -0400 (Thu, 09 Jul 2009)
New Revision: 574
Modified:
conifer/trunk/circ/circ_duration_OWA.js
conifer/trunk/circ/circ_duration_OWAL.js
Log:
updated circ rules for OWA and OWAL
Modified: conifer/trunk/circ/circ_duration_OWA.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWA.js 2009-07-08 03:36:04 UTC (rev 573)
+++ conifer/trunk/circ/circ_duration_OWA.js 2009-07-09 14:30:53 UTC (rev 574)
@@ -1,731 +1,376 @@
-/* SIP media types
-000 Other
-001 Book
-002 Magazine
-003 Bound journal
-004 Audio tape
-005 Video tape
-006 CD/CDROM
-007 Diskette
-008 Book with diskette
-009 Book with CD
-010 Book with audio tape
-*/
-
-/* set item type defaults - if the either the patron group or the circ modifier
- is missing or invalid, these settings will be used */
-
-// do these first two have any significance for us?
-result.SIPMediaType = '001';
-result.magneticMedia = 'f';
-
-// if result.durationRule is not modified for a patron group, item does not circulate
-//
-// of course, what this rule actually does is circulate the item for 0 days, meaning
-// that it is immediately due... need to move this logic over to circ_permit_patron.js
-// or circ_permit_copy.js
-result.durationRule = 'non_circ';
-
-// for fines, set the most common value here
-result.recurringFinesRule = '50_cent_per_day';
-result.maxFine = '10_dollars';
-
-/* adjust rules by patron group and circ modifier */
-
-switch(patronProfile) {
-
- case 'Patrons':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CIRC SHORT':
- // use defaults
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- // use defaults
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- // use defaults
- break;
- case 'LAW RES3D':
- // use defaults
- break;
- case 'LAW RES3H':
- // use defaults
- break;
- case 'LAW RES5H':
- // use defaults
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- // use defaults
- break;
- case 'RSV2':
- // use defaults
- break;
- case 'RSV3':
- // use defaults
- break;
- case 'RSV7':
- // use defaults
- break;
- case 'SER':
- // use defaults
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
- case 'Faculty':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
-
- /* settings for law item types are those applicable to LAW FACLTY
- and will need to be changed as soon as a conifer Law Faculty patron
- group can be created */
-
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES1D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES5H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Staff members':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
-
- /* settings for law item types are those applicable to LAW FACLTY
- and will need to be changed as soon as a conifer Law Faculty patron
- group can be created */
-
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES1D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES5H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Graduate':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = '50_cent_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Readers':
-
- /* currently STAFF, LAW1, LAW2, and LAW3. applying STAFF rules to Leddy items
- and LAWx rules to Law items - fix as soon as Windsor groups exists! */
-
- switch(copy.circ_modifier) {
- case 'cd music':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '1_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Undergraduate':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- // use defaults
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
-}
+// circ duration rules for Windsor Leddy (OWA)
+
+/* set item type defaults - if the either the patron group or the circ modifier
+ is missing or invalid, these settings will be used */
+
+// do these first two have any significance for us?
+result.SIPMediaType = '001';
+result.magneticMedia = 'f';
+
+// if result.durationRule is not modified for a patron group, set default
+// once rules for non-circulating items are figured out, use most common value here and delete unnecessary lines below
+result.durationRule = 'non_circ';
+
+// for fines, set the most common value here
+result.recurringFinesRule = '50_cent_per_day';
+result.maxFine = '10_dollars';
+
+/* adjust rules by patron group and circ modifier */
+
+switch(patronProfile) {
+
+ // currently, Patrons group is not used; rules are the same as Readers group
+ case 'Patrons':
+ switch(copy.circ_modifier) {
+ case 'CIRC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MEDIA':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'THESIS':
+ result.durationRule = '14_days_3_renew';
+ break;
+ }
+ break;
+
+ // Faculty includes former AFFL FAC, EXEC, FAC, and LAW FACLTY
+ case 'Faculty':
+ switch(copy.circ_modifier) {
+ case 'CD MUSIC':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'CIRC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CIRC SHORT':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MEDIA':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'RSV1':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV2':
+ result.durationRule = '120_minutes_0_renew';
+ result.recurringFinesRule = '5_cents_per_minute';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV3':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV7':
+ result.durationRule = '7_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'SER':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '2_dollars_per_day';
+ break;
+ case 'THESIS':
+ result.durationRule = '28_days_3_renew';
+ break;
+ }
+ break;
+
+ // includes former STAF, ILL, EXTM, and BINDERY
+ case 'Staff members':
+ switch(copy.circ_modifier) {
+ case 'CD MUSIC':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'CIRC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CIRC SHORT':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MEDIA':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'RSV1':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV2':
+ result.durationRule = '120_minutes_0_renew';
+ result.recurringFinesRule = '5_cents_per_minute';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV3':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV7':
+ result.durationRule = '7_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'SER':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '2_dollars_per_day';
+ break;
+ case 'THESIS':
+ result.durationRule = '28_days_3_renew';
+ break;
+ }
+ break;
+
+ // includes former GRAD and AFFL GRAD
+ case 'Graduate':
+ switch(copy.circ_modifier) {
+ case 'CIRC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CIRC SHORT':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MEDIA':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '28_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'RSV1':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV2':
+ result.durationRule = '120_minutes_0_renew';
+ result.recurringFinesRule = '5_cents_per_minute';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV3':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV7':
+ result.durationRule = '7_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'SER':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '2_dollars_per_day';
+ break;
+ case 'THESIS':
+ result.durationRule = '28_days_3_renew';
+ break;
+ }
+ break;
+
+ // includes former DIRB, EXAL, EXDB, EXOT, ONEPASS, and LAW COUR
+ case 'Readers':
+ switch(copy.circ_modifier) {
+ case 'CIRC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MAP (REFERENCE)':
+ // use defaults
+ break;
+ case 'MEDIA':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'THESIS':
+ result.durationRule = '14_days_3_renew';
+ break;
+ }
+ break;
+
+ // includes former AFFL UND, UND, LAW1, LAW2, and LAW3
+ case 'Undergraduate':
+ switch(copy.circ_modifier) {
+ case 'CIRC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CIRC SHORT':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'CRC MEDIA':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'CRC SPEC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'CRC TEXT':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DOC':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'DVD VIDEO':
+ result.durationRule = '3_days_1_renew';
+ break;
+ case 'MAP (CIRCULATING)':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MEDIA':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'MFORM':
+ result.durationRule = '14_days_3_renew';
+ break;
+ case 'REF':
+ result.durationRule = '7_days_3_renew';
+ break;
+ case 'RSV1':
+ result.durationRule = '1_day_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV2':
+ result.durationRule = '120_minutes_0_renew';
+ result.recurringFinesRule = '5_cents_per_minute';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV3':
+ result.durationRule = '3_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'RSV7':
+ result.durationRule = '7_days_1_renew';
+ result.recurringFinesRule = '10_dollars_per_day';
+ result.maxFine = '50_dollars';
+ break;
+ case 'THESIS':
+ result.durationRule = '14_days_3_renew';
+ break;
+ }
+ break;
+}
Modified: conifer/trunk/circ/circ_duration_OWAL.js
===================================================================
--- conifer/trunk/circ/circ_duration_OWAL.js 2009-07-08 03:36:04 UTC (rev 573)
+++ conifer/trunk/circ/circ_duration_OWAL.js 2009-07-09 14:30:53 UTC (rev 574)
@@ -1,731 +1,228 @@
-/* SIP media types
-000 Other
-001 Book
-002 Magazine
-003 Bound journal
-004 Audio tape
-005 Video tape
-006 CD/CDROM
-007 Diskette
-008 Book with diskette
-009 Book with CD
-010 Book with audio tape
-*/
-
-/* set item type defaults - if the either the patron group or the circ modifier
- is missing or invalid, these settings will be used */
-
-// do these first two have any significance for us?
-result.SIPMediaType = '001';
-result.magneticMedia = 'f';
-
-// if result.durationRule is not modified for a patron group, item does not circulate
-//
-// of course, what this rule actually does is circulate the item for 0 days, meaning
-// that it is immediately due... need to move this logic over to circ_permit_patron.js
-// or circ_permit_copy.js
-result.durationRule = 'non_circ';
-
-// for fines, set the most common value here
-result.recurringFinesRule = '50_cent_per_day';
-result.maxFine = '10_dollars';
-
-/* adjust rules by patron group and circ modifier */
-
-switch(patronProfile) {
-
- case 'Patrons':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CIRC SHORT':
- // use defaults
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- // use defaults
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- // use defaults
- break;
- case 'LAW RES3D':
- // use defaults
- break;
- case 'LAW RES3H':
- // use defaults
- break;
- case 'LAW RES5H':
- // use defaults
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- // use defaults
- break;
- case 'RSV2':
- // use defaults
- break;
- case 'RSV3':
- // use defaults
- break;
- case 'RSV7':
- // use defaults
- break;
- case 'SER':
- // use defaults
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
- case 'Faculty':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
-
- /* settings for law item types are those applicable to LAW FACLTY
- and will need to be changed as soon as a conifer Law Faculty patron
- group can be created */
-
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES1D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES5H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Staff members':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
-
- /* settings for law item types are those applicable to LAW FACLTY
- and will need to be changed as soon as a conifer Law Faculty patron
- group can be created */
-
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW NOCIRC':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES1D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3D':
- result.durationRule = '3_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES3H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW RES5H':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'LAW SERIAL':
- result.durationRule = '14_days_5_renew';
- result.recurringFinesRule = 'free';
- result.maxFine = 0;
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Graduate':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.recurringFinesRule = '50_cent_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Readers':
-
- /* currently STAFF, LAW1, LAW2, and LAW3. applying STAFF rules to Leddy items
- and LAWx rules to Law items - fix as soon as Windsor groups exists! */
-
- switch(copy.circ_modifier) {
- case 'cd music':
- result.durationRule = '3_days_1_renew';
- break;
- case 'CIRC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '1_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '28_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '28_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '2_dollars_per_day';
- break;
- case 'THESIS':
- result.durationRule = '28_days_3_renew';
- break;
- }
- break;
-
- case 'Undergraduate':
- switch(copy.circ_modifier) {
- case 'CD MUSIC':
- // use defaults
- break;
- case 'CIRC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CIRC SHORT':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'CRC MEDIA':
- result.durationRule = '7_days_3_renew';
- break;
- case 'CRC SPEC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'CRC TEXT':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DNON':
- // use defaults
- break;
- case 'DOC':
- result.durationRule = '14_days_3_renew';
- break;
- case 'DVD VIDEO':
- result.durationRule = '3_days_1_renew';
- break;
- case 'LAW MONO':
- result.durationRule = '28_days_5_renew';
- result.maxFine = '50_dollars';
- break;
- case 'LAW NOCIRC':
- // use defaults
- break;
- case 'LAW RES1D':
- result.durationRule = '16_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3D':
- result.durationRule = '2_days_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES3H':
- result.durationRule = '3_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW RES5H':
- result.durationRule = '5_hours_20_renew';
- result.recurringFinesRule = '60_cents_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'LAW SERIAL':
- // use defaults
- break;
- case 'MAP':
- // use defaults
- break;
- case 'MAP (CIRCULATING)':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MAP (REFERENCE)':
- // use defaults
- break;
- case 'MEDIA':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM':
- result.durationRule = '14_days_3_renew';
- break;
- case 'MFORM REF':
- // use defaults
- break;
- case 'MFORM SER':
- // use defaults
- break;
- case 'REF':
- result.durationRule = '7_days_3_renew';
- break;
- case 'RSV1':
- result.durationRule = '1_day_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV2':
- result.durationRule = '120_minutes_0_renew';
- result.recurringFinesRule = '5_cents_per_minute';
- result.maxFine = '50_dollars';
- break;
- case 'RSV3':
- result.durationRule = '3_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'RSV7':
- result.durationRule = '7_days_1_renew';
- result.recurringFinesRule = '10_dollars_per_day';
- result.maxFine = '50_dollars';
- break;
- case 'SER':
- // use defaults
- break;
- case 'THESIS':
- result.durationRule = '14_days_3_renew';
- break;
- }
- break;
-
-}
+// circ duration rules for Windsor Law (OWAL)
+
+/* set item type defaults - if the either the patron group or the circ modifier
+ is missing or invalid, these settings will be used */
+
+// do these first two have any significance for us?
+result.SIPMediaType = '001';
+result.magneticMedia = 'f';
+
+// if result.durationRule is not modified for a patron group, set default
+// once rules for non-circulating items are figured out, use most common value here and delete unnecessary lines below
+result.durationRule = 'non_circ';
+
+// for fines, set the most common value here
+result.recurringFinesRule = '50_cent_per_day';
+result.maxFine = '50_dollars';
+
+/* adjust rules by patron group and circ modifier */
+
+if (patron.home_ou.shortname == "OWAL") { // define Law patron rules first
+
+ switch(patronProfile) {
+
+ case 'Faculty':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW NOCIRC':
+ result.durationRule = '14_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ case 'LAW SERIAL':
+ result.durationRule = '14_days_5_renew';
+ result.recurringFinesRule = 'free';
+ result.maxFine = 500;
+ break;
+ }
+ break;
+
+ case 'Staff members':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ }
+ break;
+
+ case 'Readers':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '7_days_3_renew';
+ result.maxFine = '10_dollars';
+ break;
+ }
+ break;
+
+ case 'Undergraduate':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ }
+ break;
+ }
+
+} else { // define patron rules for non-Law patrons
+
+ switch(patronProfile) {
+
+ case 'Faculty':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW NOCIRC':
+ result.durationRule = '14_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW SERIAL':
+ result.durationRule = '14_days_5_renew';
+ break;
+ }
+ break;
+
+ case 'Staff members':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ }
+ break;
+
+ case 'Graduate':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ }
+ break;
+
+ case 'Undergraduate':
+ switch(copy.circ_modifier) {
+ case 'LAW MONO':
+ result.durationRule = '28_days_5_renew';
+ break;
+ case 'LAW RES1D':
+ result.durationRule = '1_day_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3D':
+ result.durationRule = '3_days_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES3H':
+ result.durationRule = '3_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ case 'LAW RES5H':
+ result.durationRule = '5_hours_5_renew';
+ result.recurringFinesRule = '60_cent_per_hour';
+ break;
+ }
+ break;
+ }
+}
More information about the open-ils-commits
mailing list