[open-ils-commits] r19869 - branches/rel_2_1/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 28 12:34:26 EDT 2011
Author: phasefx
Date: 2011-03-28 12:34:23 -0400 (Mon, 28 Mar 2011)
New Revision: 19869
Modified:
branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.js
branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.xul
Log:
fix up receipt options persistence in billing interface; implement # of receipts option (not perfect if using print dialogs; non-blocking and not necessarily queued up)
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.js 2011-03-28 16:34:20 UTC (rev 19868)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.js 2011-03-28 16:34:23 UTC (rev 19869)
@@ -799,6 +799,7 @@
}
try {
if ( ! $('receipt_upon_payment').hasAttribute('checked') ) { return; } // Skip print attempt
+ if ( ! $('receipt_upon_payment').getAttribute('checked') ) { return; } // Skip print attempt
var no_print_prompting = g.data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
if (no_print_prompting) {
if (no_print_prompting.indexOf( "Bill Pay" ) > -1) { return; } // Skip print attempt
@@ -831,9 +832,19 @@
'data' : g.previous_summary
};
g.error.sdump('D_DEBUG',js2JSON(params));
- if (! $('printer_prompt').hasAttribute('checked')) params.no_prompt = true;
+ if ($('printer_prompt').hasAttribute('checked')) {
+ if ($('printer_prompt').getAttribute('checked')) {
+ params.no_prompt = false;
+ } else {
+ params.no_prompt = true;
+ }
+ } else {
+ params.no_prompt = true;
+ }
JSAN.use('util.print'); var print = new util.print('receipt');
- print.tree_list( params );
+ for (var i = 0; i < $('num_of_receipts').value; i++) {
+ print.tree_list( params );
+ }
} catch(E) {
g.error.standard_unexpected_error_alert('bill receipt', E);
}
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.xul
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.xul 2011-03-28 16:34:20 UTC (rev 19868)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/bill2.xul 2011-03-28 16:34:23 UTC (rev 19869)
@@ -148,14 +148,14 @@
<spacer flex="1"/>
<button label="&staff.patron.bills_overlay.receipt_options.label;" accesskey="&staff.patron.bills_overlay.receipt_options.accesskey;" type="menu">
<menupopup>
- <menuitem id="receipt_upon_payment" type="checkbox" label="&staff.patron.bills_overlay.receipt_upon_payment.label;" accesskey="&staff.patron.bills_overlay.receipt_upon_payment.accesskey;" checked="true"/>
- <menuitem id="printer_prompt" type="checkbox" label="&staff.patron.bills_overlay.printer_prompt.label;" accesskey="&staff.patron.bills_overlay.printer_prompt.accesskey;" />
+ <menuitem id="receipt_upon_payment" type="checkbox" label="&staff.patron.bills_overlay.receipt_upon_payment.label;" accesskey="&staff.patron.bills_overlay.receipt_upon_payment.accesskey;" oils_persist="checked"/>
+ <menuitem id="printer_prompt" type="checkbox" label="&staff.patron.bills_overlay.printer_prompt.label;" accesskey="&staff.patron.bills_overlay.printer_prompt.accesskey;" oils_persist="checked"/>
<hbox style="border: solid thin black">
<vbox pack="center">
<label value="&staff.patron.bills_overlay.number_of_copies.label;" accesskey="&staff.patron.bills_overlay.number_of_copies.accesskey;" control="num_of_receipts" />
</vbox>
<vbox pack="center">
- <textbox id="num_of_receipts" value="1" type="number" min="0" size="2"/>
+ <textbox id="num_of_receipts" value="1" type="number" min="0" size="2" oils_persist="value"/>
</vbox>
</hbox>
</menupopup>
More information about the open-ils-commits
mailing list