From: Dan Scott Date: Thu, 1 Sep 2011 19:01:39 +0000 (-0400) Subject: Add Reserve circ rules for Boreal X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b161b58c0cad5ef3fcc92c6a084bbc50eee59502;p=contrib%2FConifer.git Add Reserve circ rules for Boreal Still need some clarification on how these rules are to be applied, but better to get the durations working right now and fix up the fines later. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js b/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js index b1062cf438..6225838752 100644 --- a/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js +++ b/Open-ILS/src/javascript/backend/circ/circ_duration_OSBO.js @@ -39,3 +39,18 @@ if (copy.circ_modifier == 'DVD VIDEO') { result.durationRule = '7_days_1_renew'; result.recurringFinesRule = '1_dollar_per_day'; } + +/* Reserve items - let's use regular expressions to save some pain */ +res_day_re = /^RESERVE (\d+) DAY$/; +res_hour_re = /^RESERVE (\d+) HOUR$/; +res_day_match = res_day_re.exec(copy.circ_modifier); +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 = '25_cent_per_day'; +} else if (res_hour_match) { + result.durationRule = res_hour_match[1] + '_hours_0_renew'; + result.recurringFinesRule = '25_cent_per_hour'; +} + +