3 load_lib('circ/circ_item_config.js');
4 log_vars('circ_duration');
7 /* treat pre-cat copies like vanilla books */
8 if( isTrue(isPrecat) ) {
9 log_info("pre-cat copy getting duration defaults...");
10 result.durationRule = '14_days_2_renew';
11 result.recurringFinesRule = '10_cent_per_day';
12 result.maxFine = 'overdue_mid';
18 /* grab the config from the config script */
19 var config = getItemConfig();
20 var itemForm = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : "";
23 /* -----------------------------------------------------------------------------
24 Now set the rule values based on the config. If there is no configured info
25 on this copy, fall back on defaults.
26 ----------------------------------------------------------------------------- */
29 log_debug("circ_duration found a config for the copy");
30 result.durationRule = config.durationRule;
31 result.recurringFinesRule = config.recurringFinesRule;
32 result.maxFine = config.maxFine;
36 result.durationRule = '14_days_2_renew';
37 result.recurringFinesRule = "10_cent_per_day";
38 result.maxFine = "overdue_mid";
43 /* -----------------------------------------------------------------------------
44 Add custom rules here.
45 ----------------------------------------------------------------------------- */
47 /* statelib has some special circ rules */
49 if( isOrgDescendent('STATELIB', copy.circ_lib.id) ) {
51 result.durationRule = '35_days_1_renew';
52 result.recurringFinesRule = "10_cent_per_day";
53 result.maxFine = "overdue_mid";
55 /* reference, microfiche, microfilm */
56 if( isTrue(copy.ref) ||
60 result.durationRule = '14_days_2_renew';
67 log_debug(result.durationRule + ' : ' + result.recurringFinesRule + ' : ' + result.maxFine );
73 function checkStaff() {
74 log_debug("Checking to see if patron is staff: profile = "+patronProfile);
75 if( isGroupDescendant('Staff', patronProfile) || isGroupDescendant('Outreach', patronProfile) ) {
76 result.recurringFinesRule = "staff";
77 result.maxFine = "staff";