[open-ils-commits] r14536 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 21 12:37:13 EDT 2009
Author: phasefx
Date: 2009-10-21 12:37:09 -0400 (Wed, 21 Oct 2009)
New Revision: 14536
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/renew.js
Log:
in renewal interface, add the patron data to the list rows, and remove the early return for billing summary/tally (copy/paste/think-o)
Modified: trunk/Open-ILS/xul/staff_client/server/circ/renew.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/renew.js 2009-10-21 15:55:32 UTC (rev 14535)
+++ trunk/Open-ILS/xul/staff_client/server/circ/renew.js 2009-10-21 16:37:09 UTC (rev 14536)
@@ -315,6 +315,7 @@
'mbts' : renew.parent_circ ? renew.parent_circ.billable_transaction().summary() : null,
'mvr' : renew.record,
'acp' : renew.copy,
+ 'au' : renew.patron,
'status' : renew.status,
'route_to' : renew.route_to,
'message' : renew.message
@@ -327,24 +328,25 @@
if (params.row.my.mbts && ( document.getElementById('no_change_label') || document.getElementById('fine_tally') ) ) {
JSAN.use('util.money');
var bill = params.row.my.mbts;
- if (Number(bill.balance_owed()) == 0) { return; }
- if (document.getElementById('no_change_label')) {
- var m = document.getElementById('no_change_label').getAttribute('value');
- document.getElementById('no_change_label').setAttribute(
- 'value',
- m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.billable.amount', [params.row.my.acp.barcode(), util.money.sanitize(bill.balance_owed())]) + ' '
- );
- document.getElementById('no_change_label').setAttribute('hidden','false');
+ if (Number(bill.balance_owed()) != 0) {
+ if (document.getElementById('no_change_label')) {
+ var m = document.getElementById('no_change_label').getAttribute('value');
+ document.getElementById('no_change_label').setAttribute(
+ 'value',
+ m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.billable.amount', [params.row.my.acp.barcode(), util.money.sanitize(bill.balance_owed())]) + ' '
+ );
+ document.getElementById('no_change_label').setAttribute('hidden','false');
+ }
+ if (document.getElementById('fine_tally')) {
+ var amount = Number( document.getElementById('fine_tally').getAttribute('amount') ) + Number( bill.balance_owed() );
+ document.getElementById('fine_tally').setAttribute('amount',amount);
+ document.getElementById('fine_tally').setAttribute(
+ 'value',
+ document.getElementById('circStrings').getFormattedString('staff.circ.utils.fine_tally_text', [ util.money.sanitize( amount ) ])
+ );
+ document.getElementById('fine_tally').setAttribute('hidden','false');
+ }
}
- if (document.getElementById('fine_tally')) {
- var amount = Number( document.getElementById('fine_tally').getAttribute('amount') ) + Number( bill.balance_owed() );
- document.getElementById('fine_tally').setAttribute('amount',amount);
- document.getElementById('fine_tally').setAttribute(
- 'value',
- document.getElementById('circStrings').getFormattedString('staff.circ.utils.fine_tally_text', [ util.money.sanitize( amount ) ])
- );
- document.getElementById('fine_tally').setAttribute('hidden','false');
- }
}
obj.list.node.view.selection.select(0);
@@ -373,16 +375,24 @@
},
'on_renew' : function() {
- this.controller.view.renew_barcode_entry_textbox.disabled = false;
- this.controller.view.renew_barcode_entry_textbox.select();
- this.controller.view.renew_barcode_entry_textbox.value = '';
- this.controller.view.renew_barcode_entry_textbox.focus();
+ try {
+ this.controller.view.renew_barcode_entry_textbox.disabled = false;
+ this.controller.view.renew_barcode_entry_textbox.select();
+ this.controller.view.renew_barcode_entry_textbox.value = '';
+ this.controller.view.renew_barcode_entry_textbox.focus();
+ } catch(E) {
+ alert('Error in renew.js, on_renew(): ' + E);
+ }
},
'on_failure' : function() {
- this.controller.view.renew_barcode_entry_textbox.disabled = false;
- this.controller.view.renew_barcode_entry_textbox.select();
- this.controller.view.renew_barcode_entry_textbox.focus();
+ try {
+ this.controller.view.renew_barcode_entry_textbox.disabled = false;
+ this.controller.view.renew_barcode_entry_textbox.select();
+ this.controller.view.renew_barcode_entry_textbox.focus();
+ } catch(E) {
+ alert('Error in renew.js, on_failure(): ' + E);
+ }
},
'spawn_copy_editor' : function() {
More information about the open-ils-commits
mailing list