From 5596e95aaf1d2630974dcd3efbb81befeaeb6732 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 28 Mar 2011 16:31:33 +0000 Subject: [PATCH] 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) git-svn-id: svn://svn.open-ils.org/ILS/trunk@19867 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/bill2.js | 15 +++++++++++++-- Open-ILS/xul/staff_client/server/patron/bill2.xul | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 67252b1..12109b1 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -799,6 +799,7 @@ function apply_payment() { } 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 @@ function apply_payment() { '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); } diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.xul b/Open-ILS/xul/staff_client/server/patron/bill2.xul index 7366227..e2ba9ee 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill2.xul @@ -148,14 +148,14 @@