added script for permitting holds
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Jul 2005 21:34:19 +0000 (21:34 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Jul 2005 21:34:19 +0000 (21:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1095 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/circ_rules/circ_main.rules
Evergreen/circ_rules/permit_hold.rules [new file with mode: 0644]

index 64690dc..9899256 100644 (file)
@@ -11,7 +11,7 @@
        BLOCK ret_block;
                result.0 = s;
                result.1 = t;
-               "Circ Template Result: "; result.0; " "; result.1; 
+               "Template Result: "; result.0; " "; result.1; 
                STOP;
        END;
 
diff --git a/Evergreen/circ_rules/permit_hold.rules b/Evergreen/circ_rules/permit_hold.rules
new file mode 100644 (file)
index 0000000..ccb5e46
--- /dev/null
@@ -0,0 +1,44 @@
+[%
+
+# ------------------------------------------------------------------
+# Permissibility script.  
+# ------------------------------------------------------------------
+
+
+
+# ------------------------------------------------------------------
+# Patron checks
+# ------------------------------------------------------------------
+
+IF patron.standing != "Good";
+       ret(PATRON_STANDING, "Patron not in good standing: ${patron.standing}"); END;
+
+IF patron.profile == "STAFF" && patron_copies > 50;
+       ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
+
+IF patron.profile == "ADULT" && patron_copies > 10;
+       ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
+
+IF patron.profile == "JUVENILE" && patron_copies > 5;
+       ret(PATRON_CHECKOUT_COUNT, "Patron checkout count exceeds limit"); END; 
+
+
+# ------------------------------------------------------------------
+# Copy checks
+# ------------------------------------------------------------------
+
+IF ! copy.circulate;   
+       ret(COPY_NOCIRC, "Copy is not allowed to circulate"); END; 
+
+IF !copy.location.circulate;           
+       ret(COPY_LOCATION, "Copy location not allowed to curculate"); END;
+
+IF copy.ref; 
+       ret(COPY_ISREF, "Copy is reference material"); END;
+
+
+
+
+ret(OK,"Allowed");
+
+%]