[open-ils-commits] r15262 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 6 11:39:16 EST 2010
Author: phasefx
Date: 2010-01-06 11:39:14 -0500 (Wed, 06 Jan 2010)
New Revision: 15262
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
work log for renewals, and some debugging for for checkouts
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2010-01-05 22:38:58 UTC (rev 15261)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2010-01-06 16:39:14 UTC (rev 15262)
@@ -426,23 +426,27 @@
//I could override map_row_to_column here
}
);
- obj.error.work_log(
- document.getElementById('circStrings').getFormattedString(
- (get_bool(checkout.payload.circ.opac_renewal())||get_bool(checkout.payload.circ.phone_renewal())||get_bool(checkout.payload.circ.desk_renewal())) ?
- 'staff.circ.work_log_renew.message' : 'staff.circ.work_log_checkout.message',
- [
- ses('staff_usrname'),
- xulG.patron.family_name(),
- xulG.patron.card().barcode(),
- checkout.payload.copy.barcode()
- ]
- ), {
- 'au_id' : xulG.patron.id(),
- 'au_family_name' : xulG.patron.family_name(),
- 'au_barcode' : xulG.patron.card().barcode(),
- 'acp_barcode' : checkout.payload.copy.barcode()
- }
- );
+ try {
+ obj.error.work_log(
+ document.getElementById('circStrings').getFormattedString(
+ (get_bool(checkout.payload.circ.opac_renewal())||get_bool(checkout.payload.circ.phone_renewal())||get_bool(checkout.payload.circ.desk_renewal())) ?
+ 'staff.circ.work_log_renew.message' : 'staff.circ.work_log_checkout.message',
+ [
+ ses('staff_usrname'),
+ xulG.patron.family_name(),
+ xulG.patron.card().barcode(),
+ checkout.payload.copy.barcode()
+ ]
+ ), {
+ 'au_id' : xulG.patron.id(),
+ 'au_family_name' : xulG.patron.family_name(),
+ 'au_barcode' : xulG.patron.card().barcode(),
+ 'acp_barcode' : checkout.payload.copy.barcode()
+ }
+ );
+ } catch(E) {
+ obj.error.sdump('D_ERROR','Error with work_logging in server/circ/checkout.js, _checkout:' + E);
+ }
document.getElementById('msg_area').removeChild(x);
/*
if (typeof obj.on_checkout == 'function') {
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-01-05 22:38:58 UTC (rev 15261)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-01-06 16:39:14 UTC (rev 15262)
@@ -2896,6 +2896,47 @@
break;
}
}
+ try {
+ var ibarcode = renew[0].payload.copy ? renew[0].payload.copy.barcode() : params.barcode;
+ var p_id = renew[0].payload.patron ? renew[0].payload.patron.id() : renew[0].payload.circ.usr();
+ var pname; var pbarcode;
+ if (renew[0].patron) {
+ pname = renew[0].payload.patron.family_name();
+ pbarcode = typeof renew[0].payload.patron.card() == 'object' ? renew[0].payload.patron.card().barcode() : null;
+ } else {
+ if (circ.util.renew_via_barcode.last_usr_id == p_id) {
+ pname = circ.util.renew_via_barcode.last_pname;
+ pbarcode = circ.util.renew_via_barcode.last_pbarcode;
+ } else {
+ JSAN.use('patron.util'); var p = patron.util.retrieve_fleshed_au_via_id(ses(),p_id);
+ pname = p.family_name();
+ pbarcode = typeof p.card() == 'object' ? p.card().barcode() : null;
+ if (pname) {
+ circ.util.renew_via_barcode.last_usr_id = p_id;
+ circ.util.renew_via_barcode.last_pname = pname;
+ circ.util.renew_via_barcode.last_pbarcode = pbarcode;
+ }
+ }
+ }
+ error.work_log(
+ document.getElementById('circStrings').getFormattedString(
+ 'staff.circ.work_log_renew.message',
+ [
+ ses('staff_usrname'),
+ pname ? pname : '???',
+ pbarcode ? pbarcode : '???',
+ ibarcode ? ibarcode : '???'
+ ]
+ ), {
+ 'au_id' : p_id,
+ 'au_family_name' : pname,
+ 'au_barcode' : pbarcode,
+ 'acp_barcode' : ibarcode
+ }
+ );
+ } catch(E) {
+ error.sdump('D_ERROR','Error with work_logging in server/circ/util.js, renew_via_barcode():' + E);
+ }
if (typeof async == 'function') async(renew);
return renew;
} catch(E) {
More information about the open-ils-commits
mailing list