[open-ils-commits] r14066 - in trunk/Open-ILS/xul/staff_client/server: locale/en-US patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 18 18:58:20 EDT 2009
Author: phasefx
Date: 2009-09-18 18:58:20 -0400 (Fri, 18 Sep 2009)
New Revision: 14066
Modified:
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/items.js
Log:
reworked error handling for setting claimed returned. added PATRON_EXCEEDS_CLAIMS_RETURN_COUNT as an overridable event
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-09-18 22:57:49 UTC (rev 14065)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-09-18 22:58:20 UTC (rev 14066)
@@ -228,6 +228,7 @@
staff.patron.items.items_claimed_returned.claimed_returned=Claimed Returned
staff.patron.items.items_claimed_returned.enter_returned_date=Enter a claimed returned date for these items: %1$s
staff.patron.items.items_claimed_returned.not_marked_claimed_returned=The items were not likely marked Claimed Returned.
+staff.patron.items.set_claim_returned_failure=Override set claimed returned failure?
staff.patron.items.items_checkin.confirm_item_check_in.singular=Are you sure you would like to check in item %1$s?
staff.patron.items.items_checkin.confirm_item_check_in.plural=Are you sure you would like to check in items %1$s?
staff.patron.items.items_checkin.no_checkin=Checkin probably did not happen.
Modified: trunk/Open-ILS/xul/staff_client/server/patron/items.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-09-18 22:57:49 UTC (rev 14065)
+++ trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-09-18 22:58:20 UTC (rev 14066)
@@ -444,15 +444,33 @@
if (backdate) {
backdate = util.date.formatted_date(backdate + ' 00:00:00','%{iso8601}');
var barcodes = util.functional.map_list(retrieve_ids,function(o){return o.barcode;});
+ var do_not_move_these = {};
for (var i = 0; i < barcodes.length; i++) {
var robj = obj.network.simple_request(
'MARK_ITEM_CLAIM_RETURNED',
- [ ses(), { barcode: barcodes[i], backdate: backdate } ]
+ [ ses(), { barcode: barcodes[i], backdate: backdate } ],
+ null,
+ {
+ 'title' : $("patronStrings").getString('staff.patron.items.set_claim_returned_failure'),
+ 'overridable_events' : [
+ 'PATRON_EXCEEDS_CLAIMS_RETURN_COUNT'
+ ]
+ }
);
- if (typeof robj.ilsevent != 'undefined') { if (robj.ilsevent != 0) throw(robj); }
+ if (typeof robj.ilsevent != 'undefined') {
+ if (robj.ilsevent != 0 && robj.textcode != 'PATRON_EXCEEDS_CLAIMS_RETURN_COUNT' ) {
+ do_not_move_these[ barcodes[i] ] = true;
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.items.items_claimed_returned.not_marked_claimed_returned'),E);
+ }
+ if (robj.textcode == 'PATRON_EXCEEDS_CLAIMS_RETURN_COUNT') {
+ do_not_move_these[ barcodes[i] ] = true;
+ }
+ }
}
}
- for (var i = 0; i < retrieve_ids.length; i++) obj.refresh(retrieve_ids[i].circ_id,true);
+ for (var i = 0; i < retrieve_ids.length; i++) {
+ obj.refresh(retrieve_ids[i].circ_id, !do_not_move_these[ retrieve_ids[i].barcode ]);
+ }
} catch(E) {
obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.items.items_claimed_returned.not_marked_claimed_returned'),E);
}
More information about the open-ils-commits
mailing list