[open-ils-commits] r8292 - branches/rel_1_2_1/Open-ILS/xul/staff_client/server/patron

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 2 10:57:23 EST 2008


Author: phasefx
Date: 2008-01-02 10:33:48 -0500 (Wed, 02 Jan 2008)
New Revision: 8292

Modified:
   branches/rel_1_2_1/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
disallow editing the pickup locations for intransit or ready for pickup holds

Modified: branches/rel_1_2_1/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- branches/rel_1_2_1/Open-ILS/xul/staff_client/server/patron/holds.js	2008-01-02 15:27:31 UTC (rev 8291)
+++ branches/rel_1_2_1/Open-ILS/xul/staff_client/server/patron/holds.js	2008-01-02 15:33:48 UTC (rev 8292)
@@ -54,6 +54,7 @@
 									if (typeof blob.ilsevent != 'undefined') throw(blob);
 									row.my.ahr = blob.hold;
 									row.my.status = blob.status;
+                                    row.my.ahr.status( blob.status );
 									row.my.acp = blob.copy;
 									row.my.acn = blob.volume;
 									row.my.mvr = blob.mvr;
@@ -445,6 +446,17 @@
 						function() {
 							try {
 								JSAN.use('util.widgets'); JSAN.use('util.functional'); 
+
+                                var deny_edit_because_of_transit = false;
+                                for (var i = 0; i < obj.retrieve_ids.length; i++) {
+                                    var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
+                                    if (hold.status() > 2 /* Which means holds that are In-Transit or Ready for Pickup */) deny_edit_because_of_transit = true;
+                                }
+                                if (deny_edit_because_of_transit) {
+                                    alert('You may not edit the pickup library for holds that are in-transit or ready for pickup.');
+                                    return;
+                                }
+
 								var list = util.functional.map_list(
 									obj.data.list.aou,
 									function(o) { 



More information about the open-ils-commits mailing list