added to cvs
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 14:32:40 +0000 (14:32 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 14:32:40 +0000 (14:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3369 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/javascript/backend/circ/circ_permit_renew.js [new file with mode: 0644]

diff --git a/Open-ILS/src/javascript/backend/circ/circ_permit_renew.js b/Open-ILS/src/javascript/backend/circ/circ_permit_renew.js
new file mode 100644 (file)
index 0000000..e83997c
--- /dev/null
@@ -0,0 +1,23 @@
+function go() {
+
+/* load the lib script */
+load_lib('circ_lib.js');
+
+/* collect some useful variables */
+var copy                                       = environment.copy;
+var patron                             = environment.patron;
+var patronStanding     = patron.standing.value.toLowerCase();
+var patronProfile              = patron.profile.name.toLowerCase();
+var copyStatus                 = copy.status.name.toLowerCase();
+var patronItemsOut     = environment.patronItemsOut;
+var patronFines                = environment.patronFines;
+var isRenewal                  = environment.isRenewal;
+
+var holds = copy.fetchHolds();
+for( var i in holds ) {
+       var hold = holds[i];
+       if( hold && hold.usr != patron.id )
+               return result.event = 'COPY_NEEDED_FOR_HOLD';
+}
+
+} go();