[open-ils-commits] r11668 - trunk/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 23 14:44:05 EST 2008
Author: phasefx
Date: 2008-12-23 14:44:01 -0500 (Tue, 23 Dec 2008)
New Revision: 11668
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Log:
in patron retrieval interface for checkouts, replace the barcode.exist call with one that returns the user id or an event on failure
Modified: trunk/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul 2008-12-23 19:41:09 UTC (rev 11667)
+++ trunk/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul 2008-12-23 19:44:01 UTC (rev 11668)
@@ -94,23 +94,25 @@
tb.disabled = true;
document.getElementById('progress').setAttribute('hidden','false');
- net.simple_request('PATRON_BARCODE_EXISTS.authoritative',[ ses(), barcode ],
+ net.simple_request('FM_AU_ID_RETRIEVE_VIA_BARCODE_OR_USERNAME',[ ses(), barcode, null ],
function(req) {
document.getElementById('progress').setAttribute('hidden','true');
tb.disabled = false; tb.select(); tb.focus(); ;
var robj = req.getResultObject();
if (typeof robj.ilsevent != 'undefined') {
sound.bad();
- add_msg($("patronStrings").getFormattedString('staff.patron.barcode_entry.barcode_retrieval_problem', [barcode, js2JSON(robj)]));
+ switch(Number(robj.ilsevent)) {
+ case 1002 /* ACTOR_USER_NOT_FOUND */:
+ add_msg($("patronStrings").getFormattedString('staff.patron.barcode_entry.barcode_not_found', [barcode]));
+ break;
+ default:
+ add_msg($("patronStrings").getFormattedString('staff.patron.barcode_entry.barcode_retrieval_problem', [barcode, js2JSON(robj)]));
+ }
return;
- } else if (robj == 0) {
- sound.bad();
- add_msg($("patronStrings").getFormattedString('staff.patron.barcode_entry.barcode_not_found', [barcode]));
- return;
}
if (g.data.user_org_unit_opt_in_enabled) {
- var r = net.simple_request('USER_ORG_UNIT_OPT_IN_CHECK',[ ses(), robj ]); // FIXME -- robj is no longer returning a usr id
+ var r = net.simple_request('USER_ORG_UNIT_OPT_IN_CHECK',[ ses(), robj ]);
if (typeof r.ilsevent != 'undefined') {
throw(r);
} else {
More information about the open-ils-commits
mailing list