[open-ils-commits] r7533 -
trunk/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 9 13:41:10 EDT 2007
Author: phasefx
Date: 2007-07-09 13:36:43 -0400 (Mon, 09 Jul 2007)
New Revision: 7533
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/bills.js
trunk/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul
Log:
Added an Annotate Payment checkbox to bill interface. Fixed a regression with xulG/modal-window munging
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bills.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2007-07-06 17:09:54 UTC (rev 7532)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2007-07-09 17:36:43 UTC (rev 7533)
@@ -455,29 +455,31 @@
var win = new util.window();
switch(obj.controller.view.payment_type.value) {
case 'credit_card_payment' :
- //obj.OpenILS.data.temp = '';
- //obj.OpenILS.data.stash('temp');
+ obj.OpenILS.data.temp = '';
+ obj.OpenILS.data.stash('temp');
var my_xulG = win.open(
urls.XUL_PATRON_BILL_CC_INFO,
'billccinfo',
'chrome,resizable,modal'
);
- //obj.OpenILS.data.stash_retrieve();
- payment_blob = my_xulG.payment_blob; //JSON2js( obj.OpenILS.data.temp );
+ obj.OpenILS.data.stash_retrieve();
+ //payment_blob = my_xulG.payment_blob; //JSON2js( obj.OpenILS.data.temp );
+ payment_blob = JSON2js( obj.OpenILS.data.temp );
break;
case 'check_payment' :
- //obj.OpenILS.data.temp = '';
- //obj.OpenILS.data.stash('temp');
+ obj.OpenILS.data.temp = '';
+ obj.OpenILS.data.stash('temp');
var my_xulG = win.open(
urls.XUL_PATRON_BILL_CHECK_INFO,
'billcheckinfo',
'chrome,resizable,modal'
);
- //obj.OpenILS.data.stash_retrieve();
- payment_blob = my_xulG.payment_blob; //JSON2js( obj.OpenILS.data.temp );
+ obj.OpenILS.data.stash_retrieve();
+ //payment_blob = my_xulG.payment_blob; //JSON2js( obj.OpenILS.data.temp );
+ payment_blob = JSON2js( obj.OpenILS.data.temp );
break;
}
- if (payment_blob=='' || payment_blob.cancelled=='true') { alert('cancelled'); return; }
+ if ((typeof payment_blob == 'undefined') || payment_blob=='' || payment_blob.cancelled=='true') { alert('cancelled'); return; }
payment_blob.userid = obj.patron_id;
payment_blob.note = payment_blob.note || '';
//payment_blob.cash_drawer = 1; // FIXME: get new Config() to work
@@ -543,6 +545,10 @@
'pay' : function(payment_blob) {
var obj = this;
try {
+ var x = document.getElementById('annotate_payment');
+ if (x && x.checked && (! payment_blob.note)) {
+ payment_blob.note = window.prompt('Please annotate this payment:','','Annotate Payment');
+ }
obj.previous_summary = {
original_balance : obj.controller.view.bill_total_owed.value,
voided_balance : obj.controller.view.voided_balance.value,
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul 2007-07-06 17:09:54 UTC (rev 7532)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul 2007-07-09 17:36:43 UTC (rev 7533)
@@ -107,6 +107,7 @@
<button id="bill_wizard" label="Bill Patron" accesskey="B" command="cmd_bill_wizard"/>
<button id="bill_history" label="History" accesskey="H" command="cmd_bill_history"/>
<spacer flex="2"/>
+ <checkbox id="annotate_payment" label="Annotate Payment" persist="checked" checked="false" />
<checkbox id="auto_print" label="Auto-Print" persist="checked" checked="true" />
<button class="hide_patron_credit" hidden="true" disabled="true" id="change_to_credit" label="Convert Change to Patron Credit" command="cmd_change_to_credit"/>
<button id="bill_apply_payment" label="Apply Payment!" accesskey="P" command="cmd_bill_apply_payment"/>
More information about the open-ils-commits
mailing list