From 34f4481e28d173db8c767c218d8d67f526abeb3a Mon Sep 17 00:00:00 2001 From: risard Date: Wed, 2 Sep 2009 18:23:40 +0000 Subject: [PATCH] Fixed OSTMA circ duration. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@639 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- circ/circ_duration_OSTMA.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/circ/circ_duration_OSTMA.js b/circ/circ_duration_OSTMA.js index 7e35bee1df..800684e9e9 100644 --- a/circ/circ_duration_OSTMA.js +++ b/circ/circ_duration_OSTMA.js @@ -1,3 +1,10 @@ +var currentTime = new Date(); +var debugStamp = "circ_duraction_test" + (currentTime.getMonth() + 1) + "" + + "" + currentTime.getDate() + "" + currentTime.getFullYear() + + ": "; + +log_info(debugStamp + "here for OSTMA"); + /* grab the config from the config script */ var config = getItemConfig(); var itemForm = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : ""; @@ -18,7 +25,14 @@ if (patronProfile == 'Faculty'){ /*Set exceptions for other materials*/ /* AV MATERIALS */ -if (copy.circ_modifier == 'AUDIO' || 'VIDEO' || 'DVD VIDEO' && patronProfile == 'Faculty'){ +if (copy.circ_modifier == 'AUDIO' || + copy.circ_modifier == 'VIDEO' || + copy.circ_modifer == 'DVD VIDEO' || + copy.location.name == 'ALGO-AV' && + patronProfile == 'Faculty' + + ){ + result.durationRule = '14_days_0_renew'; result.recurringFinesRule = '2_dollars_per_day'; result.maxFine = '25_dollars'; @@ -33,10 +47,10 @@ res_hour_match = res_hour_re.exec(copy.circ_modifier); if (res_day_match) { result.durationRule = res_day_match[1] + '_days_0_renew'; result.recurringFinesRule = '2_dollars_per_day'; - result.maxFine = '15_dollars; + result.maxFine = '15_dollars'; } else if (res_hour_match) { result.durationRule = res_hour_match[1] + '_hours_0_renew'; - result.recurringFinesRule = '50_cents_per_hour'; + result.recurringFinesRule = '50_cent_per_hour'; result.maxFine = '15_dollars'; } -- 2.11.0